From nobody Sun Oct 5 01:49:29 2025 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=1757419844; cv=none; d=zohomail.com; s=zohoarc; b=dQk22X7Sd9lUp7+dhRV7I46grDLomkZ4A+/wQXLuxibTCz9Om3njo/f7xub2prXJHMZxduXpzDdvFsBvMg5QbJlg7t8u9GyPwBknvipyNbFq8czQpXspY8IGff1cJQ4nQip4tgnHoewbIKEAeieeOX8z/W2VM1zyl18CFhRS/lk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1757419844; 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=JRlDlEas05IcV6K85HQYang7eQ5Hl85hkA4vn80bMm4=; b=f6RTe09mr5Vcs001Z3HRtce9OuHMCOLvVy7ujxqTgyxZASr8H7+/Pj+kYD1KMptXUrHM7jr2Uq2JyUDM+ICcRzQZXUn0/dPfu665x4bY/C5ZucTMapVONe8TBzcovTvF/lNNd7rt82A4zX09YY6sVTI6PfrTkc3WKxsphBxvPNI= 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 1757419844112526.8926986619648; Tue, 9 Sep 2025 05:10:44 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 0627941BA8; Tue, 9 Sep 2025 08:10:10 -0400 (EDT) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id D5C0D41B24; Tue, 9 Sep 2025 08:07:28 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 7F3D841AD9; Tue, 9 Sep 2025 08:06:42 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 5F53241ADD for ; Tue, 9 Sep 2025 08:06:41 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-593-XAqwkIA7MEGexyo_SQRRKg-1; Tue, 09 Sep 2025 08:06:39 -0400 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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D6703180034C for ; Tue, 9 Sep 2025 12:06:38 +0000 (UTC) Received: from hjs (unknown [10.43.3.187]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3D3BB1956095 for ; Tue, 9 Sep 2025 12:06:38 +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=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, 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=1757419601; 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=JRlDlEas05IcV6K85HQYang7eQ5Hl85hkA4vn80bMm4=; b=BMVO4kd6X6Q3iQjhuhBPjj5dO52L6lpqBtwTYPL7eqvZciKEU/TQ+VssC0key4Anh1/RC9 EEKZP3DF7CqDo2NP4wZdvNfVa4YgPYrEet9QzNMz/DlMPvJNkFFnuH5Y8xiohSNPNW8dIP pqUgBujSq9eLs1mO1NLOmWm95ejN15A= X-MC-Unique: XAqwkIA7MEGexyo_SQRRKg-1 X-Mimecast-MFC-AGG-ID: XAqwkIA7MEGexyo_SQRRKg_1757419598 To: devel@lists.libvirt.org Subject: [libvirt PATCH 3/8] tests: qemuxmlconftest: Introduce testQemuConfMarkUsed Date: Tue, 9 Sep 2025 14:05:44 +0200 Message-ID: <5832eddc283e3088fe76826a68474da458eebfa8.1757419549.git.jtomko@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: dUvWDkT7gSuY2qqeZP_rMy5Eo6xvErVpNDC37U0prao_1757419598 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TEFMGOL6QSLM5GLQPEPVXAQDZSNPTUD3 X-Message-ID-Hash: TEFMGOL6QSLM5GLQPEPVXAQDZSNPTUD3 X-MailFrom: jtomko@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: =?utf-8?q?J=C3=A1n_Tomko_via_Devel?= Reply-To: =?UTF-8?q?J=C3=A1n=20Tomko?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1757419844752116600 From: J=C3=A1n Tomko Make the code readable enough to not need a comment. Signed-off-by: J=C3=A1n Tomko --- tests/qemuxmlconftest.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index a7e32a5a99..dea75d805f 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -598,6 +598,15 @@ testInfoCheckDuplicate(testQemuInfo *info) } =20 =20 +static void +testQemuConfMarkUsed(testQemuInfo *info, + const char *file) +{ + if (file) + ignore_value(g_hash_table_remove(info->conf->existingTestCases, fi= le)); +} + + /** * testQemuConfXMLCommon: Prepare common test data (e.g. parse input XML) * for a test case. @@ -630,14 +639,10 @@ testQemuConfXMLCommon(testQemuInfo *info, if (info->prepared) goto cleanup; =20 - /* mark test case as used */ - ignore_value(g_hash_table_remove(info->conf->existingTestCases, info->= infile)); - if (info->outfile) - ignore_value(g_hash_table_remove(info->conf->existingTestCases, in= fo->outfile)); - if (info->errfile) - ignore_value(g_hash_table_remove(info->conf->existingTestCases, in= fo->errfile)); - if (info->out_xml_inactive) - ignore_value(g_hash_table_remove(info->conf->existingTestCases, in= fo->out_xml_inactive)); + testQemuConfMarkUsed(info, info->infile); + testQemuConfMarkUsed(info, info->outfile); + testQemuConfMarkUsed(info, info->errfile); + testQemuConfMarkUsed(info, info->out_xml_inactive); =20 if (testQemuInfoInitArgs((testQemuInfo *) info) < 0) goto cleanup; --=20 2.50.1