From nobody Sun Feb 8 17:13:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578987324; cv=none; d=zohomail.com; s=zohoarc; b=K71jbXcSm03fM+GYSqNIvIdC4MNF/A38i5oBiEUTsAYrd6zdwb4a9k2Cd2cZ9MyC/TT2njqu0W2CmD7gQbuEo3nylbJIaOJ8cceMUr0C6oA1Y3YXYbj5QP9cJypNd9l/b0J6n/mMvIfJVkhLtqp105G92DYHYv9mYMJSyPrvfSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578987324; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fytPvWhrd6RZPCAiAtfD6oTcOSh6GeG+Pehojc3N8mo=; b=JilvAswi1WWzgJDLBQoSErfKb4rI/uxT7lu0nVT4A/uo739pr1YmYjLPDr1PzzNUb7d4gjMQbOgfhS/5PYLGBFq1g5Ffr2OoxqP/t3G8GGBuSvuXZa5RKqYNJk5liFFN+F2KireR1x5P64WXrdsbcegMGiH6ZmYuwKS/5wrXE20= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578987324226188.69113575919255; Mon, 13 Jan 2020 23:35:24 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-47-2tdiSRccNHKYm_nePeqMeg-1; Tue, 14 Jan 2020 02:35:21 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B0DE0800D41; Tue, 14 Jan 2020 07:35:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88C775C1BB; Tue, 14 Jan 2020 07:35:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 281A5825C4; Tue, 14 Jan 2020 07:35:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00E7Yt8O020083 for ; Tue, 14 Jan 2020 02:34:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0C1408177F; Tue, 14 Jan 2020 07:34:55 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.43.2.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 869488886A for ; Tue, 14 Jan 2020 07:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578987323; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=fytPvWhrd6RZPCAiAtfD6oTcOSh6GeG+Pehojc3N8mo=; b=dQHZjL9AqvnAkK0Ys35kyDZZ8yT2uE4iy3aNkkiiAw1rfDBHaPCZXUbOW8c4g8edKQjSwC YTBzBHzZE+acREfF4iynaBrp0hyHfKAW84tUO31uZHkyCdATIEADeDaowJ8fi6EiA0tzqA Ep9bBN7kbQ22FIYDIkBgVGOXpjaeqBU= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 14 Jan 2020 08:35:39 +0100 Message-Id: <81a87c07756289092b5d71fd2170f0eed0f30e10.1578987257.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/7] virbuftest: use field names when initalizing test info X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 2tdiSRccNHKYm_nePeqMeg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Allow adding new fields without changing all the macros. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Erik Skultety --- tests/virbuftest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/virbuftest.c b/tests/virbuftest.c index bb606c1c28..1780b62bf4 100644 --- a/tests/virbuftest.c +++ b/tests/virbuftest.c @@ -372,9 +372,9 @@ mymain(void) DO_TEST("set indent", testBufSetIndent); DO_TEST("autoclean", testBufferAutoclean); =20 -#define DO_TEST_ADD_STR(DATA, EXPECT) \ +#define DO_TEST_ADD_STR(_data, _expect) \ do { \ - struct testBufAddStrData info =3D { DATA, EXPECT }; \ + struct testBufAddStrData info =3D { .data =3D _data, .expect =3D _= expect }; \ if (virTestRun("Buf: AddStr", testBufAddStr, &info) < 0) \ ret =3D -1; \ } while (0) @@ -384,9 +384,9 @@ mymain(void) DO_TEST_ADD_STR("\n", "\n \n"); DO_TEST_ADD_STR("\n \n\n", "\n \n \n \n= "); =20 -#define DO_TEST_ESCAPE(data, expect) \ +#define DO_TEST_ESCAPE(_data, _expect) \ do { \ - struct testBufAddStrData info =3D { data, expect }; \ + struct testBufAddStrData info =3D { .data =3D _data, .expect =3D _= expect }; \ if (virTestRun("Buf: EscapeStr", testBufEscapeStr, &info) < 0) \ ret =3D -1; \ } while (0) @@ -400,9 +400,9 @@ mymain(void) DO_TEST_ESCAPE("\x01\x01\x02\x03\x05\x08", "\n \n"); =20 -#define DO_TEST_ESCAPE_REGEX(data, expect) \ +#define DO_TEST_ESCAPE_REGEX(_data, _expect) \ do { \ - struct testBufAddStrData info =3D { data, expect }; \ + struct testBufAddStrData info =3D { .data =3D _data, .expect =3D _= expect }; \ if (virTestRun("Buf: EscapeRegex", testBufEscapeRegex, &info) < 0)= \ ret =3D -1; \ } while (0) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list