From nobody Mon Feb 2 07:31:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611543; cv=none; d=zohomail.com; s=zohoarc; b=a5lTnj5X9ufew6JTW2MiBTAG3PxifHIhPA/JL8cgbxWmHaV4/B1fAad7Cy79w/z3h5rXhamNd5OADkCf9RwbyY4ykkEgjgR2YiN9vhUlvYALx0cdwTFL2wBHLyuz6nZ0QbZxbgkRzhuV4ldF07RHV2Nx6YNoS19eJWJmZkn1htc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611543; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=wTtXNqJ5tM4eCKob8t8aJ6lL+RpSPU2+6/UmSfu16qo=; b=Fcq0uwi4l3qC3sC6izigYxUv9A1csN8GSGafPBYnIbRbHM6QhxiDnz+JwZEbjSKiCkU2e6GebOigPt7aP/69rTOvaTzhzDUvVeuSXdFwAAEXBoj4/c4OiRg7XyWSuMVf8pF40xPp6LyU1YnN2aT6IqYhZvBQSB8wZws6HBRriIA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611543725763.8761362296341; Wed, 28 Jan 2026 06:45:43 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3711F418FB; Wed, 28 Jan 2026 09:45:43 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 7B98544075; Wed, 28 Jan 2026 09:32:46 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 00CBE41904; Wed, 28 Jan 2026 09:32:42 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 6FE3F3FB96 for ; Wed, 28 Jan 2026 09:31:01 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-Ba3zby9jNgeyqO_bl8YBsQ-1; Wed, 28 Jan 2026 09:30:58 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E239A1955D88 for ; Wed, 28 Jan 2026 14:30:57 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4C2D01956095 for ; Wed, 28 Jan 2026 14:30:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610661; h=from:from: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; bh=wTtXNqJ5tM4eCKob8t8aJ6lL+RpSPU2+6/UmSfu16qo=; b=ZCzHUUPEkmNIIzV/ZMvAFy4KiODJ/8EnWmnJtIg3dbb2zA/LOZdu/iVi9zqz+i8R+zjEYG TvUl3QJABO80lps0kp+gitJEafjaBJbjic8603tjlwHRtA2EQjJgyJ7pMHtpBaZ/EfwDgX HQSOTnFrtcThrrSurEGJUbOPpukfKuE= X-MC-Unique: Ba3zby9jNgeyqO_bl8YBsQ-1 X-Mimecast-MFC-AGG-ID: Ba3zby9jNgeyqO_bl8YBsQ_1769610658 To: devel@lists.libvirt.org Subject: [PATCH 11/20] networkxml2conftest: Allow regenerating more in one run Date: Wed, 28 Jan 2026 15:30:32 +0100 Message-ID: <0799ac237d70e3c5b2c22172bafdaeaab8f79ad3.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: huA7jz3yfKPYcpUhKBm5vsS--tZP3skx8oAA3AVTEAM_1769610658 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: SW2FTT6VYQHGAU6EA4RHG6FZHNMXK7RZ X-Message-ID-Hash: SW2FTT6VYQHGAU6EA4RHG6FZHNMXK7RZ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611544951154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Currently, there are two calls to virTestCompareToFile() inside of testCompareXMLToConfFiles(). If the first one fails the control jumps directly onto the fail label and skips the second one. This means that When regenerating test case output (VIR_TEST_REGENERATE_OUTPUT) the test binary has to be called twice to regenerate all the files. Suboptimal. Try harder to call both compare helpers. Signed-off-by: Michal Privoznik --- tests/networkxml2conftest.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index cb2cafa918..c7534773a3 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -29,6 +29,7 @@ testCompareXMLToConfFiles(const char *inxml, const char *= outconf, g_autofree char *pidfile =3D NULL; g_autoptr(dnsmasqContext) dctx =3D NULL; g_autoptr(virNetworkXMLOption) xmlopt =3D NULL; + bool compareFailed =3D false; =20 if (!(xmlopt =3D networkDnsmasqCreateXMLConf())) goto fail; @@ -73,20 +74,23 @@ testCompareXMLToConfFiles(const char *inxml, const char= *outconf, #endif =20 if (virTestCompareToFile(confactual, outconf) < 0) - goto fail; + compareFailed =3D true; =20 if (hostsfileactual) { if (virTestCompareToFile(hostsfileactual, outhostsfile) < 0) { - goto fail; + compareFailed =3D true; } } else { if (virFileExists(outhostsfile)) { VIR_TEST_DEBUG("%s: hostsfile exists but the configuration did= not specify any host", outhostsfile); - goto fail; + compareFailed =3D true; } } =20 + if (compareFailed) + goto fail; + ret =3D 0; =20 fail: --=20 2.52.0