From nobody Fri Sep 20 22:14:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1692889378; cv=none; d=zohomail.com; s=zohoarc; b=CntKbDZdh5p+waYlVVfkgDBWJf6Vi9V6PqSu7UIwfAxETLIJU16Mw0K9nvKCS7LleitRaJheTPS7L7b05f5EPZmCa8myQQ7PEnp1wiUOFLXerBm25CClQl2H9t6pa2pbzDa5SgwcVsgNZaYnnmY2A/ZYjb+CiXY07npqDQH0Lyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692889378; 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=7xkJWJb1iniSKrhsf+tCZ5gjfvZWAjbM0BZMhqQMddw=; b=T8sEDgvg4W2fZ3Whhln8/aryE81mPpo48fG7rlocG2StSWuGG/DfMkMWEIb4HAYFTjPg9i6t19Npb9WTzYibSFD09hC+xoewJft71mlKEx1JeN1WYOblZVZ3Enp5musnsqzYCrVEUjvHYDQnzsa0Yx0Ck1QaKFWEfNbyCEmVDXg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1692889378127393.4475741596335; Thu, 24 Aug 2023 08:02:58 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-402-fHSB1CvrPGWQcANZVptf8Q-1; Thu, 24 Aug 2023 11:02:52 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8F743823D5E; Thu, 24 Aug 2023 15:02:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5944246A3A0; Thu, 24 Aug 2023 15:02:45 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0FF7E19465BB; Thu, 24 Aug 2023 15:02:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A6A161946589 for ; Thu, 24 Aug 2023 15:02:42 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 962542166B27; Thu, 24 Aug 2023 15:02:42 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18ECD2166B26 for ; Thu, 24 Aug 2023 15:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692889377; 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=7xkJWJb1iniSKrhsf+tCZ5gjfvZWAjbM0BZMhqQMddw=; b=N82PAo9TkbXBLxgvP46SUp3p4K4esqYOecvDVUYK/ZnBMBdSLnJx7Rk7egelAzAMSLl/Mi lwauWTLKrm+hH26zl0OyPRqsxaiwWXojlrcO1MKVGSOT64FXZFBJlq46Gjp+WyLy/LNQmk +AiKFeVHoAgrztZ51pUxYADcJhmRm0s= X-MC-Unique: fHSB1CvrPGWQcANZVptf8Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/5] qemuxml2xmltest: Rework file name generation in 'testInfoSetPaths' Date: Thu, 24 Aug 2023 17:02:36 +0200 Message-ID: <17a9f48e547ed6d893d127fa1e5d757eaae2674d.1692889197.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1692889435507100002 Content-Type: text/plain; charset="utf-8" Pass the state-based suffix directly as string. Document the logic how the filename is chosen. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2xmltest.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b1989cbb5f..ccf9cfcef0 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -75,10 +75,22 @@ testXML2XMLInactive(const void *opaque) } +/** + * testInfoSetPaths: + * @info: test info structure to populate + * @suffix: suffix used to create output file name e.g. ".x86-64_latest" + * @statesuffix: suffix to create output file name based on tested state (= "active" | "inactive") + * + * This function populates @info with the correct input and output file pa= ths. + * + * The output file is chosen based on whether a version with @statesuffix = exists. + * If yes, it's used, if no the @statesuffix is omitted and it's expected = that + * both the "active" and "inactive" versions are the same. + */ static void testInfoSetPaths(struct testQemuInfo *info, const char *suffix, - int when) + const char *statesuffix) { VIR_FREE(info->infile); VIR_FREE(info->outfile); @@ -88,7 +100,7 @@ testInfoSetPaths(struct testQemuInfo *info, info->outfile =3D g_strdup_printf("%s/qemuxml2xmloutdata/%s-%s%s.xml", abs_srcdir, info->name, - when =3D=3D WHEN_ACTIVE ? "active" : "= inactive", suffix); + statesuffix, suffix); if (!virFileExists(info->outfile)) { VIR_FREE(info->outfile); @@ -146,12 +158,12 @@ mymain(void) testQemuInfoSetArgs(&info, &testConf, __VA_ARGS__); \ \ if (when & WHEN_INACTIVE) { \ - testInfoSetPaths(&info, suffix, WHEN_INACTIVE); \ + testInfoSetPaths(&info, suffix, "inactive"); \ virTestRunLog(&ret, "QEMU XML-2-XML-inactive " _name, testXML2= XMLInactive, &info); \ } \ \ if (when & WHEN_ACTIVE) { \ - testInfoSetPaths(&info, suffix, WHEN_ACTIVE); \ + testInfoSetPaths(&info, suffix, "active"); \ virTestRunLog(&ret, "QEMU XML-2-XML-active " _name, testXML2XM= LActive, &info); \ } \ testQemuInfoClear(&info); \ --=20 2.41.0 From nobody Fri Sep 20 22:14:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1692889378; cv=none; d=zohomail.com; s=zohoarc; b=UQXrOSKpnZyCZLAR2x1prMt9RCXS8VyPVeYf+XPX7mLnO6qVHyBjICQdgfQGX7utcPwpV03tHrUse9Wk2Lwjhy9RhLEe9PD2Y1gGBt7Z5LFpD19RyvwPnEUcJzn4cAQd4kS3tLkx/wndzjJ4ImnACR5pBpwm8Lo3vIN1/4PVYoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692889378; 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=QyiC/AQUKw0Jgl2l5A3iu7JuwaKOMukoq6Pbc2T1H44=; b=ePveTixrT0Bk8thFj/EspjZnva+UNqkA2G1NSMq2qJQX08ULMPV2YU/5p/NqTqq0QsxMzS6NwL8ZUVjxXc46J+0jzXI1u7gOp7C8NJFNkJwWc9Mte/U8bveigp7LByBa3dYdmNfbHnvil9oLZAuu49T4+ze4IUkQWpNNQeosMj0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 16928893787431011.3746812501543; Thu, 24 Aug 2023 08:02:58 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-227-qoo0BidfPha93XryulPF2g-1; Thu, 24 Aug 2023 11:02:52 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8EFC9805951; Thu, 24 Aug 2023 15:02:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF17DC1602B; Thu, 24 Aug 2023 15:02:45 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 977DF19465A2; Thu, 24 Aug 2023 15:02:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7F9CD1946589 for ; Thu, 24 Aug 2023 15:02:43 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 707C92166B26; Thu, 24 Aug 2023 15:02:43 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id E37CC2166B27 for ; Thu, 24 Aug 2023 15:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692889377; 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=QyiC/AQUKw0Jgl2l5A3iu7JuwaKOMukoq6Pbc2T1H44=; b=STT2U13Hg/QWVw9yafQaQS48oSxU1VzBryenwsQlfxsS8LpybAF9C6YhYcZso7pAmoSQ3D LcGoybRb/191YIw1zX8JRHgT4C5vQlq+MzzG55z/zjg91kGQCkiYSW1lZOMhbGlRqk/uEZ V92JmQw8098/TZ5nJhB6RK4BRZNgM0w= X-MC-Unique: qoo0BidfPha93XryulPF2g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/5] qemuxml2xmltest: Use DO_TEST_CAPS_ARCH_LATEST_FULL for arm GIC tests Date: Thu, 24 Aug 2023 17:02:37 +0200 Message-ID: <37b9282a2d10946dc77e412519836987c2a98b60.1692889197.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1692889446135100003 Content-Type: text/plain; charset="utf-8" Use the new macro instead of open coding it. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2xmltest.c | 84 +++++++++++------------------------------ 1 file changed, 21 insertions(+), 63 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index ccf9cfcef0..c67909404f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -782,69 +782,27 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("aarch64-traditional-pci", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-video-default", "aarch64"); - DO_TEST_FULL("aarch64-gic-none", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-none-v2", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-none-v3", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-none-both", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-none-tcg", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-default", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-default-v2", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-default-v3", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-default-both", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-v2", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-v2", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-v2", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-v2", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-v3", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-v3", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-v3", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-v3", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_BOTH, ARG_END); - DO_TEST_FULL("aarch64-gic-host", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_NONE, ARG_END); - DO_TEST_FULL("aarch64-gic-host", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V2, ARG_END); - DO_TEST_FULL("aarch64-gic-host", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_V3, ARG_END); - DO_TEST_FULL("aarch64-gic-host", ".aarch64-latest", WHEN_BOTH, - ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_GIC, GIC_BOTH, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-none", "aarch64", ARG_GIC, = GIC_NONE, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-none-v2", "aarch64", ARG_GI= C, GIC_V2, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-none-v3", "aarch64", ARG_GI= C, GIC_V3, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-none-both", "aarch64", ARG_= GIC, GIC_BOTH, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-none-tcg", "aarch64", ARG_G= IC, GIC_BOTH, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-default", "aarch64", ARG_GI= C, GIC_NONE, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-default-v2", "aarch64", ARG= _GIC, GIC_V2, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-default-v3", "aarch64", ARG= _GIC, GIC_V3, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-default-both", "aarch64", A= RG_GIC, GIC_BOTH, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-v2", "aarch64", ARG_GIC, GI= C_NONE, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-v2", "aarch64", ARG_GIC, GI= C_V2, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-v2", "aarch64", ARG_GIC, GI= C_V3, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-v2", "aarch64", ARG_GIC, GI= C_BOTH, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-v3", "aarch64", ARG_GIC, GI= C_NONE, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-v3", "aarch64", ARG_GIC, GI= C_V2, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-v3", "aarch64", ARG_GIC, GI= C_V3, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-v3", "aarch64", ARG_GIC, GI= C_BOTH, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-host", "aarch64", ARG_GIC, = GIC_NONE, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-host", "aarch64", ARG_GIC, = GIC_V2, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-host", "aarch64", ARG_GIC, = GIC_V3, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("aarch64-gic-host", "aarch64", ARG_GIC, = GIC_BOTH, ARG_END); /* SVE aarch64 CPU features work on modern QEMU */ DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64"); --=20 2.41.0 From nobody Fri Sep 20 22:14:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1692889381; cv=none; d=zohomail.com; s=zohoarc; b=XifKn4la8AGEmmpKyTLtYZKEvXJIvDpIdHhr2aO4WciqB5YT6dp1lWVRYQi9yEVqlAGswKIlj31HiESa8l3XYnLboiR/wM5O1P9mLFqJMt4sCmKrjAMn9XamCuC0RLr7zFCqTFW64o1Qcdi2B7bpV6p3Fzw9oZOKTxRPvKB/PeU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692889381; 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=WAyAv6d8onYvY1hW8F2JCMV+s1a1zH+7o7IaPkaYf1Q=; b=F7UGld+w/2SYMQzK78WlK6A0E1L7n4rPXX9/Egz1APXBVFwzGUDQVpzXNAy+qnwjJ+1syB76ZxmrRcLzSMqvUZQ5IHVI4Qj8U00KrLyAh2LdiqFRhRzYVv3mgkXR4daDZUPunTv/2I+ZZKkiGPvNaJ+VqvD01sAHkmhkSgtsgoE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 169288938124938.27068763327634; Thu, 24 Aug 2023 08:03:01 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-627-UX5v8iVSM5mMj31icOf2Ww-1; Thu, 24 Aug 2023 11:02:56 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 27783185A794; Thu, 24 Aug 2023 15:02:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AFC340282C; Thu, 24 Aug 2023 15:02:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4396F19465B1; Thu, 24 Aug 2023 15:02:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4E73919465A2 for ; Thu, 24 Aug 2023 15:02:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3D9DF2166B26; Thu, 24 Aug 2023 15:02:44 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB5092166B27 for ; Thu, 24 Aug 2023 15:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692889379; 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=WAyAv6d8onYvY1hW8F2JCMV+s1a1zH+7o7IaPkaYf1Q=; b=doHdLaqQM4L96XkSYkGkNb3jHOkuW6jOe7rNPOKzlXS48kmVwV3z+qY6TwG37xcPiQgXDI g2rWulw1dED/3GT/4YmHtqxS6hmI8zCL0HFRWjNVdncKGSOq94BhH2TZbu6U2fRf8F88Au jsmwVp8GrxUPZSOPu5Pb/3l7X6Es2A0= X-MC-Unique: UX5v8iVSM5mMj31icOf2Ww-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/5] qemuxml2argvtest: Pass expected state via struct testQemuInfo's 'flags' member Date: Thu, 24 Aug 2023 17:02:38 +0200 Message-ID: <6479b83bd641112431b41b1e566bb9a5461603ad.1692889197.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1692889435459100001 Content-Type: text/plain; charset="utf-8" Rather than having a separate argument to DO_TEST pass the state via newly added flags 'FLAG_SKIP_CONFIG_ACTIVE'. The '_INACTIVE' equivalent was not added as there's no test which'd use it. Remove the old 'WHEN_' flags and move the decision logic out of the DO_TEST macro as any addition to the logic makes the compiler take much longer to compile qemuxml2xmltest. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2xmltest.c | 36 ++++++++++++++---------------------- tests/testutilsqemu.h | 1 + 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index c67909404f..e6018f8240 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -19,13 +19,6 @@ static virQEMUDriver driver; -enum { - WHEN_INACTIVE =3D 1, - WHEN_ACTIVE =3D 2, - WHEN_BOTH =3D 3, -}; - - static int testXML2XMLCommon(const struct testQemuInfo *info) { @@ -46,6 +39,9 @@ testXML2XMLActive(const void *opaque) { const struct testQemuInfo *info =3D opaque; + if (info->flags & FLAG_SKIP_CONFIG_ACTIVE) + return EXIT_AM_SKIP; + if (testXML2XMLCommon(info) < 0 || testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, info->infile, info->outfile, true, @@ -150,27 +146,23 @@ mymain(void) virSetConnectSecret(conn); virSetConnectStorage(conn); -#define DO_TEST_FULL(_name, suffix, when, ...) \ +#define DO_TEST_FULL(_name, suffix, ...) \ do { \ static struct testQemuInfo info =3D { \ .name =3D _name, \ }; \ testQemuInfoSetArgs(&info, &testConf, __VA_ARGS__); \ \ - if (when & WHEN_INACTIVE) { \ - testInfoSetPaths(&info, suffix, "inactive"); \ - virTestRunLog(&ret, "QEMU XML-2-XML-inactive " _name, testXML2= XMLInactive, &info); \ - } \ + testInfoSetPaths(&info, suffix, "inactive"); \ + virTestRunLog(&ret, "QEMU XML-2-XML-inactive " _name, testXML2XMLI= nactive, &info); \ \ - if (when & WHEN_ACTIVE) { \ - testInfoSetPaths(&info, suffix, "active"); \ - virTestRunLog(&ret, "QEMU XML-2-XML-active " _name, testXML2XM= LActive, &info); \ - } \ + testInfoSetPaths(&info, suffix, "active"); \ + virTestRunLog(&ret, "QEMU XML-2-XML-active " _name, testXML2XMLAct= ive, &info); \ testQemuInfoClear(&info); \ } while (0) #define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \ - DO_TEST_FULL(name, "." arch "-" ver, WHEN_BOTH, \ + DO_TEST_FULL(name, "." arch "-" ver, \ ARG_CAPS_ARCH, arch, \ ARG_CAPS_VER, ver, \ __VA_ARGS__, \ @@ -511,17 +503,17 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("ppc64-tpmproxy-single", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("ppc64-tpmproxy-with-tpm", "ppc64"); - DO_TEST_FULL("seclabel-dynamic-baselabel", "", WHEN_INACTIVE, ARG_END); - DO_TEST_FULL("seclabel-dynamic-override", "", WHEN_INACTIVE, ARG_END); - DO_TEST_FULL("seclabel-dynamic-labelskip", "", WHEN_INACTIVE, ARG_END); - DO_TEST_FULL("seclabel-dynamic-relabel", "", WHEN_INACTIVE, ARG_END); + DO_TEST_FULL("seclabel-dynamic-baselabel", "", ARG_FLAGS, FLAG_SKIP_CO= NFIG_ACTIVE, ARG_END); + DO_TEST_FULL("seclabel-dynamic-override", "", ARG_FLAGS, FLAG_SKIP_CON= FIG_ACTIVE, ARG_END); + DO_TEST_FULL("seclabel-dynamic-labelskip", "", ARG_FLAGS, FLAG_SKIP_CO= NFIG_ACTIVE, ARG_END); + DO_TEST_FULL("seclabel-dynamic-relabel", "", ARG_FLAGS, FLAG_SKIP_CONF= IG_ACTIVE, ARG_END); DO_TEST_CAPS_LATEST("seclabel-static"); DO_TEST_CAPS_LATEST("seclabel-static-labelskip"); DO_TEST_CAPS_LATEST("seclabel-none"); DO_TEST_CAPS_LATEST("seclabel-dac-none"); DO_TEST_CAPS_LATEST("seclabel-dynamic-none"); DO_TEST_CAPS_LATEST("seclabel-device-multiple"); - DO_TEST_FULL("seclabel-dynamic-none-relabel", "", WHEN_INACTIVE, + DO_TEST_FULL("seclabel-dynamic-none-relabel", "", ARG_FLAGS, FLAG_SKIP= _CONFIG_ACTIVE, ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_SPICE, QEMU_CAPS_LAST, ARG_END); diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index e0d116336e..7845ac7cb6 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -59,6 +59,7 @@ typedef enum { FLAG_REAL_CAPS =3D 1 << 3, FLAG_SKIP_LEGACY_CPUS =3D 1 << 4, FLAG_SLIRP_HELPER =3D 1 << 5, + FLAG_SKIP_CONFIG_ACTIVE =3D 1 << 6, /* Skip 'active' config test in qe= muxml2xmltest */ } testQemuInfoFlags; struct testQemuConf { --=20 2.41.0 From nobody Fri Sep 20 22:14:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1692889462; cv=none; d=zohomail.com; s=zohoarc; b=QWc+BjjTL3GIdH9KIQXc8J4H12TPODQAHZcevNG/ftjH6T4iBqXIlP2epVqSC2fJp0KFqgV3MGfNRoDCklEYBUWbigJpBTmEcPOc6yC1O5Ie/TbIhWapQMPB03okYuBvRFW1ejE3HW0Mbcx+KAZcM/SjL8AvFMsHQX0q9I3yxQ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692889462; 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=MwIgFAhhcq+1NL9KBjOQVeQ5Ns/rM0e/4MX3s/DLrac=; b=ncj2btgWuZuLT7SunUEsV/A5HFbAZhpxMU15IYWUSyjzwv/AgDxDy70Fqv5x99F8uZQic2xd91ZUvwrE1R/vql2umqMKHbbr1ST7x0GPxRp1ZlCBO+lQUJ47jV7OzfFKfPf8s2RVit+PTLXrZHjDXkKMgY0vKvdJbqRbZr+u1/o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1692889462196719.7778832591773; Thu, 24 Aug 2023 08:04:22 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-91-Tb00G43MMLaPP54AiUc2hg-1; Thu, 24 Aug 2023 11:03:10 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 75F893844E10; Thu, 24 Aug 2023 15:03:07 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 641F9C1602B; Thu, 24 Aug 2023 15:03:07 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0A84819465B3; Thu, 24 Aug 2023 15:03:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3642519465A4 for ; Thu, 24 Aug 2023 15:02:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0C4522166B28; Thu, 24 Aug 2023 15:02:45 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 899E22166B27 for ; Thu, 24 Aug 2023 15:02:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692889458; 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=MwIgFAhhcq+1NL9KBjOQVeQ5Ns/rM0e/4MX3s/DLrac=; b=isgR5t1wqPZRcmkerzCM5i7MAAzhPuKZMNpP3G+xU87B8yVq9H1mcGZvgD+5li+4UIemMk wOGUdxt9mEgVnNH0waDB8xCNuhLXNFTGGpihL6TWsmGTK5ybJw7tpVgoO31VbXfmxTnYEk wE9+mLWvU4BSSbxdV75WG6o7RMaKm6M= X-MC-Unique: Tb00G43MMLaPP54AiUc2hg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/5] qemuxml2xmltest: Modernize rest of 'seclabel-*' tests Date: Thu, 24 Aug 2023 17:02:39 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1692889471331100001 Content-Type: text/plain; charset="utf-8" Use real capabilities for these last few tests that were not modernized due to use of 'WHEN_INACTIVE'. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- ...el-dynamic-baselabel-inactive.x86_64-latest.xml} | 5 ++++- ...el-dynamic-labelskip-inactive.x86_64-latest.xml} | 5 ++++- ...dynamic-none-relabel-inactive.x86_64-latest.xml} | 5 ++++- ...bel-dynamic-override-inactive.x86_64-latest.xml} | 5 ++++- ...abel-dynamic-relabel-inactive.x86_64-latest.xml} | 5 ++++- tests/qemuxml2xmltest.c | 13 +++++-------- 6 files changed, 25 insertions(+), 13 deletions(-) rename tests/qemuxml2xmloutdata/{seclabel-dynamic-baselabel-inactive.xml = =3D> seclabel-dynamic-baselabel-inactive.x86_64-latest.xml} (90%) rename tests/qemuxml2xmloutdata/{seclabel-dynamic-labelskip-inactive.xml = =3D> seclabel-dynamic-labelskip-inactive.x86_64-latest.xml} (90%) rename tests/qemuxml2xmloutdata/{seclabel-dynamic-none-relabel-inactive.xm= l =3D> seclabel-dynamic-none-relabel-inactive.x86_64-latest.xml} (92%) rename tests/qemuxml2xmloutdata/{seclabel-dynamic-override-inactive.xml = =3D> seclabel-dynamic-override-inactive.x86_64-latest.xml} (92%) rename tests/qemuxml2xmloutdata/{seclabel-dynamic-relabel-inactive.xml =3D= > seclabel-dynamic-relabel-inactive.x86_64-latest.xml} (89%) diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.x= ml b/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.x86_64-la= test.xml similarity index 90% rename from tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.xml rename to tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.x86_= 64-latest.xml index 5fa8455f77..7ab0558e66 100644 --- a/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.xml +++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.x86_64-l= atest.xml @@ -8,6 +8,9 @@ hvm + + qemu64 + destroy restart @@ -20,7 +23,7 @@
- +
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.x= ml b/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.x86_64-la= test.xml similarity index 90% rename from tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.xml rename to tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.x86_= 64-latest.xml index 5fa8455f77..7ab0558e66 100644 --- a/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.xml +++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.x86_64-l= atest.xml @@ -8,6 +8,9 @@ hvm + + qemu64 + destroy restart @@ -20,7 +23,7 @@
- +
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactiv= e.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.x86= _64-latest.xml similarity index 92% rename from tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive= .xml rename to tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.x= 86_64-latest.xml index 09c019e474..005e13334c 100644 --- a/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.xml +++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.x86_6= 4-latest.xml @@ -16,13 +16,16 @@ + + qemu64 + destroy restart destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.xm= l b/tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.x86_64-late= st.xml similarity index 92% rename from tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.xml rename to tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.x86_6= 4-latest.xml index 56f15db911..7c1d16d0b2 100644 --- a/tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.xml +++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.x86_64-la= test.xml @@ -8,6 +8,9 @@ hvm + + qemu64 + destroy restart @@ -32,7 +35,7 @@
- +
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.xml= b/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.x86_64-latest= .xml similarity index 89% rename from tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.xml rename to tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.x86_64= -latest.xml index a2b4a3e19e..d94c33d47b 100644 --- a/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.xml +++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.x86_64-lat= est.xml @@ -8,6 +8,9 @@ hvm + + qemu64 + destroy restart @@ -20,7 +23,7 @@
- +
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index e6018f8240..f6be677694 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -503,20 +503,17 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("ppc64-tpmproxy-single", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("ppc64-tpmproxy-with-tpm", "ppc64"); - DO_TEST_FULL("seclabel-dynamic-baselabel", "", ARG_FLAGS, FLAG_SKIP_CO= NFIG_ACTIVE, ARG_END); - DO_TEST_FULL("seclabel-dynamic-override", "", ARG_FLAGS, FLAG_SKIP_CON= FIG_ACTIVE, ARG_END); - DO_TEST_FULL("seclabel-dynamic-labelskip", "", ARG_FLAGS, FLAG_SKIP_CO= NFIG_ACTIVE, ARG_END); - DO_TEST_FULL("seclabel-dynamic-relabel", "", ARG_FLAGS, FLAG_SKIP_CONF= IG_ACTIVE, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-baselabel", "x86_64", = ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-override", "x86_64", A= RG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-labelskip", "x86_64", = ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-relabel", "x86_64", AR= G_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END); DO_TEST_CAPS_LATEST("seclabel-static"); DO_TEST_CAPS_LATEST("seclabel-static-labelskip"); DO_TEST_CAPS_LATEST("seclabel-none"); DO_TEST_CAPS_LATEST("seclabel-dac-none"); DO_TEST_CAPS_LATEST("seclabel-dynamic-none"); DO_TEST_CAPS_LATEST("seclabel-device-multiple"); - DO_TEST_FULL("seclabel-dynamic-none-relabel", "", ARG_FLAGS, FLAG_SKIP= _CONFIG_ACTIVE, - ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_CIRRUS_VGA, - QEMU_CAPS_SPICE, QEMU_CAPS_LAST, - ARG_END); + DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-none-relabel", "x86_64= ", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END); DO_TEST_CAPS_LATEST("numad-static-vcpu-no-numatune"); DO_TEST_CAPS_LATEST("disk-scsi-disk-vpd"); --=20 2.41.0 From nobody Fri Sep 20 22:14:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1692889383; cv=none; d=zohomail.com; s=zohoarc; b=J5+siTdtCgGFzwzWTIaMpNvEnZHTpYmbu6Hy/b4s0HpBxkw5tLBbwdokYcxR48hId28QcRlAMMqzOmGwx+hiPJqvzrPioscWh0ANxBMInBVFt2lk/z6XcWuEy06dmi6TUSOUmfiC3gZuH3xttzL0xglZELizuhwEQqma2fVYTQ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692889383; 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=GOLoJL9eqx4o0oQfqbnxSbFkKDLCq+XiEJDH2Rmux4A=; b=Xq73gCNezXwZPTdtUiANeM+V5/KXCskxidbrG1ACMhXNNzedIPrgE/iCduXI3/aUx+5mqqVtlUdTMOz4LzTzlXL2ceoovizLIgwrPOy22WlcmqREe2dcAoK5LmXJk6tnYZU769+ECjbcrMBHnbUyu92l+sp/f3ii5MBFDy9/W9Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1692889383782721.7996397573702; Thu, 24 Aug 2023 08:03:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-142-EtwSbmMAPZKX_osAqJevNA-1; Thu, 24 Aug 2023 11:02:57 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BE500185A792; Thu, 24 Aug 2023 15:02:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB70A6B59D; Thu, 24 Aug 2023 15:02:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7FF0219465A0; Thu, 24 Aug 2023 15:02:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 108FA1946589 for ; Thu, 24 Aug 2023 15:02:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CAEC82166B26; Thu, 24 Aug 2023 15:02:45 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5730A2166B2F for ; Thu, 24 Aug 2023 15:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692889382; 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=GOLoJL9eqx4o0oQfqbnxSbFkKDLCq+XiEJDH2Rmux4A=; b=emt580cPViJ0gkzNwr1TczIeauIYp8SEAf5SeQB85pjWqvapEnGAUS3LmWguvR1+bwNRW6 uDVr2xeL14GWu3wUVuHJLiGFPCdFgOorFlCfoL8rHuD7Jow4lQCtk+x77cMSyxKRT3pwMr emK1nVDOBH48Z3GOPXMltzWaXUue98k= X-MC-Unique: EtwSbmMAPZKX_osAqJevNA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 5/5] qemuxml2xmltest: Merge DO_TEST macro into DO_TEST_CAPS_INTERNAL Date: Thu, 24 Aug 2023 17:02:40 +0200 Message-ID: <26883f7bd526e1a298feff3be73f7f3ebc5528d7.1692889197.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1692889445722100001 Content-Type: text/plain; charset="utf-8" Now all tests invoke a real-capability version. Remove DO_TEST. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2xmltest.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index f6be677694..895e24d522 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -146,28 +146,24 @@ mymain(void) virSetConnectSecret(conn); virSetConnectStorage(conn); -#define DO_TEST_FULL(_name, suffix, ...) \ +#define DO_TEST_CAPS_INTERNAL(_name, arch, ver, ...) \ do { \ static struct testQemuInfo info =3D { \ .name =3D _name, \ }; \ - testQemuInfoSetArgs(&info, &testConf, __VA_ARGS__); \ + testQemuInfoSetArgs(&info, &testConf, \ + ARG_CAPS_ARCH, arch, \ + ARG_CAPS_VER, ver, \ + __VA_ARGS__, ARG_END); \ \ - testInfoSetPaths(&info, suffix, "inactive"); \ + testInfoSetPaths(&info, "." arch "-" ver, "inactive"); \ virTestRunLog(&ret, "QEMU XML-2-XML-inactive " _name, testXML2XMLI= nactive, &info); \ \ - testInfoSetPaths(&info, suffix, "active"); \ + testInfoSetPaths(&info, "." arch "-" ver, "active"); \ virTestRunLog(&ret, "QEMU XML-2-XML-active " _name, testXML2XMLAct= ive, &info); \ testQemuInfoClear(&info); \ } while (0) -#define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \ - DO_TEST_FULL(name, "." arch "-" ver, \ - ARG_CAPS_ARCH, arch, \ - ARG_CAPS_VER, ver, \ - __VA_ARGS__, \ - ARG_END) - #define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \ DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__) --=20 2.41.0