From nobody Wed Jan 15 08:29:39 2025 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1704733223985147.06318993185425; Mon, 8 Jan 2024 09:00:23 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id E7C7B1A5E; Mon, 8 Jan 2024 12:00:22 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 86C0F1B0F; Mon, 8 Jan 2024 11:08:46 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 2F6691A6F; Mon, 8 Jan 2024 11:07:45 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 38D0E1A45 for ; Mon, 8 Jan 2024 11:06:15 -0500 (EST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-ph6xbYuFNCy2iSKUIzQ8JA-1; Mon, 08 Jan 2024 11:06:13 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 61C8F8489A0 for ; Mon, 8 Jan 2024 16:06:13 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1F1CC15A0C for ; Mon, 8 Jan 2024 16:06:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: ph6xbYuFNCy2iSKUIzQ8JA-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 18/23] qemuxml2argvtest: Add parsing of the input XML as separate test Date: Mon, 8 Jan 2024 17:05:48 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: 7R2ZNIUQHA6OHLSQEV2XFKF64ZZ6ERTJ X-Message-ID-Hash: 7R2ZNIUQHA6OHLSQEV2XFKF64ZZ6ERTJ X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1704733224743100001 Get clean separation between the parsing and argv conversion so that it's obvious in the test output: 2409) QEMU XML def parse s390-async-teardown.s390x-6.0.0 ...= libvirt: QEMU Driver error : unsupported configuration: asynchronous teard= own is not available with this QEMU binary OK 2410) QEMU XML def -> ARGV s390-async-teardown.s390x-6.0.0 ...= SKIP Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6552c7f9c2..d06bed32cb 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -903,6 +903,18 @@ testConfXMLEnumerate(GHashTable *existingTestCases) } +static int +testXMLParse(const void *data) +{ + testQemuInfo *info =3D (void *) data; + int rc =3D 0; + + testQemuConfXMLCommon(info, &rc); + + return rc; +} + + static void testRun(const char *name, const char *suffix, @@ -910,7 +922,8 @@ testRun(const char *name, struct testQemuConf *testConf, ...) { - g_autofree char *testname =3D g_strdup_printf("QEMU XML-2-ARGV %s%s", = name, suffix); + g_autofree char *name_parse =3D g_strdup_printf("QEMU XML def parse %s= %s", name, suffix); + g_autofree char *name_argv =3D g_strdup_printf("QEMU XML def -> ARGV %= s%s", name, suffix); g_autoptr(testQemuInfo) info =3D g_new0(testQemuInfo, 1); va_list ap; @@ -925,7 +938,8 @@ testRun(const char *name, info->outfile =3D g_strdup_printf("%s/qemuxml2argvdata/%s%s.args", abs= _srcdir, info->name, suffix); info->errfile =3D g_strdup_printf("%s/qemuxml2argvdata/%s%s.err", abs_= srcdir, info->name, suffix); - virTestRunLog(ret, testname, testCompareXMLToArgv, info); + virTestRunLog(ret, name_parse, testXMLParse, info); + virTestRunLog(ret, name_argv, testCompareXMLToArgv, info); /* clear overriden host cpu */ if (info->args.capsHostCPUModel) --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org