From nobody Mon Feb 9 11:05:56 2026 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=1667492573; cv=none; d=zohomail.com; s=zohoarc; b=SYAYCOtLcWgFpWpHyjHzzmXXXixuQkKylYOEwjiY5XBJw1yyivFcmF7BT6NEeZ6/kcAQZy1Le/jI8SE7dslsZXVokh+zNFHvrii7iqLHEkM5slgpOZ4wc/YcQ/PkkPKFwXgYN/Vzu1DmGrf/lYql+YJ6ENAIPw6HhSeH3u+5kEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667492573; 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=zuOTFnA66n+VuXQcj4reLrUooJrDMv0NXXF9BkO4TEE=; b=cL5VPqwuShyXwKkyP5eU6SC1gvmQKeE7tFoYkFD/7MqEBPiiFzad6caxu7NTvnscIvhHdMY6m84WGvOuAB6B5UX0uFqWgFZ9HndxAWAUDuFMfQdYcpZCZKR/0dn0NyUGLdlxyjG70CaCyGJdXyGFADXf1VVm7f88VUCs88IeGeA= 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 1667492573959157.56627455973057; Thu, 3 Nov 2022 09:22:53 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [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-1-pil7ONAdPB-ECBruk7JCcw-1; Thu, 03 Nov 2022 12:22:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F3A313C0ED6B; Thu, 3 Nov 2022 16:22:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBCC940C2087; Thu, 3 Nov 2022 16:22:18 +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 739C91947054; Thu, 3 Nov 2022 16:22:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A253A1946594 for ; Thu, 3 Nov 2022 16:22:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 92A011402BDA; Thu, 3 Nov 2022 16:22:16 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37C0B1402BD9 for ; Thu, 3 Nov 2022 16:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667492572; 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=zuOTFnA66n+VuXQcj4reLrUooJrDMv0NXXF9BkO4TEE=; b=PJotCu/VjDh2b1cjcersNC2FTj60dmsTQ8g7pbOiBDuliBsZsbfwWJBIcLNPF9F/E3GoWT jnMVxiovyF9KYf6OS0IaFSvHVuvbckAB+iCfvjF3ZnXjOgVmr1inWht8jULIc+0W1SryE8 9VR58qS/6hrwVKi94S5bJdwI2nc/9R4= X-MC-Unique: pil7ONAdPB-ECBruk7JCcw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 02/15] qemuxml2xmltest: Convert hugepages related tests to _CAPS_LATEST Date: Thu, 3 Nov 2022 17:22:00 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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.1 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: 1667492575084100004 Content-Type: text/plain; charset="utf-8"; x-default="true" Currently, we have maybe a dozen tests for hugepages related stuff in qemuxml2xmltest. In all cases DO_TEST() is used, which means we have to enumerate all capabilities needed (though, it's usually just QEMU_CAPS_OBJECT_MEMORY_RAM and QEMU_CAPS_OBJECT_MEMORY_FILE, exceptionally QEMU_CAPS_DEVICE_PC_DIMM too). Nevertheless, these caps made sense back in QEMU 2.X era when these objects were being introduced. But now, almost 8 years after the fact we can safely assume every QEMU knows these caps. Therefore, switch to DO_TEST_CAPS_LATEST(). Since some of our expected output files are just a symlink to their respective input files, these are changed too. But from QEMU's POV nothing changes as no .args file is changed. Oh, and I'm also adding a 'hugepages-memaccess3' test case, which was missing, surprisingly. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- .../qemuxml2argvdata/hugepages-default-2M.xml | 5 +- .../hugepages-default-system-size.xml | 5 +- tests/qemuxml2argvdata/hugepages-default.xml | 16 +++++- .../qemuxml2argvdata/hugepages-memaccess.xml | 5 +- .../qemuxml2argvdata/hugepages-memaccess2.xml | 5 +- .../qemuxml2argvdata/hugepages-memaccess3.xml | 10 +++- tests/qemuxml2argvdata/hugepages-nodeset.xml | 8 ++- .../hugepages-numa-default-2M.xml | 8 ++- .../hugepages-numa-default-dimm.xml | 5 +- .../hugepages-numa-nodeset-part.xml | 8 ++- .../hugepages-numa-nodeset.xml | 8 ++- tests/qemuxml2argvdata/hugepages-nvdimm.xml | 5 +- tests/qemuxml2argvdata/hugepages-shared.xml | 17 ++++-- tests/qemuxml2argvdata/pages-dimm-discard.xml | 5 +- .../pages-discard-hugepages.xml | 5 +- ...=3D> hugepages-default-2M.x86_64-latest.xml} | 0 ...ges-default-system-size.x86_64-latest.xml} | 0 .../hugepages-default.x86_64-latest.xml | 1 + .../qemuxml2xmloutdata/hugepages-default.xml | 34 ------------ ... =3D> hugepages-memaccess.x86_64-latest.xml} | 0 ...=3D> hugepages-memaccess2.x86_64-latest.xml} | 0 .../hugepages-memaccess3.x86_64-latest.xml | 1 + .../hugepages-nodeset.x86_64-latest.xml | 1 + .../qemuxml2xmloutdata/hugepages-nodeset.xml | 31 ----------- ...ugepages-numa-default-2M.x86_64-latest.xml | 1 + .../hugepages-numa-default-2M.xml | 37 ------------- ...pages-numa-default-dimm.x86_64-latest.xml} | 0 ...epages-numa-nodeset-part.x86_64-latest.xml | 1 + .../hugepages-numa-nodeset-part.xml | 37 ------------- .../hugepages-numa-nodeset.x86_64-latest.xml | 1 + .../hugepages-numa-nodeset.xml | 40 -------------- ...xml =3D> hugepages-nvdimm.x86_64-latest.xml} | 0 .../hugepages-shared.x86_64-latest.xml | 1 + tests/qemuxml2xmloutdata/hugepages-shared.xml | 55 ------------------- ...l =3D> pages-dimm-discard.x86_64-latest.xml} | 0 ...pages-discard-hugepages.x86_64-latest.xml} | 0 tests/qemuxml2xmltest.c | 33 +++++------ 37 files changed, 107 insertions(+), 282 deletions(-) rename tests/qemuxml2xmloutdata/{hugepages-default-2M.xml =3D> hugepages-d= efault-2M.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{hugepages-default-system-size.xml =3D> hu= gepages-default-system-size.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-default.x86_64-lates= t.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-default.xml rename tests/qemuxml2xmloutdata/{hugepages-memaccess.xml =3D> hugepages-me= maccess.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{hugepages-memaccess2.xml =3D> hugepages-m= emaccess2.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-la= test.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-lates= t.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-nodeset.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_= 64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml rename tests/qemuxml2xmloutdata/{hugepages-numa-default-dimm.xml =3D> huge= pages-numa-default-dimm.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x8= 6_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-= latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml rename tests/qemuxml2xmloutdata/{hugepages-nvdimm.xml =3D> hugepages-nvdim= m.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest= .xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-shared.xml rename tests/qemuxml2xmloutdata/{pages-dimm-discard.xml =3D> pages-dimm-di= scard.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{pages-discard-hugepages.xml =3D> pages-di= scard-hugepages.x86_64-latest.xml} (100%) diff --git a/tests/qemuxml2argvdata/hugepages-default-2M.xml b/tests/qemuxm= l2argvdata/hugepages-default-2M.xml index 296933c6f2..49d1f45c0d 100644 --- a/tests/qemuxml2argvdata/hugepages-default-2M.xml +++ b/tests/qemuxml2argvdata/hugepages-default-2M.xml @@ -13,13 +13,16 @@ hvm + + qemu64 + destroy restart destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuxml2argvdata/hugepages-default-system-size.xml b/tes= ts/qemuxml2argvdata/hugepages-default-system-size.xml index f9c99da400..7cb8078844 100644 --- a/tests/qemuxml2argvdata/hugepages-default-system-size.xml +++ b/tests/qemuxml2argvdata/hugepages-default-system-size.xml @@ -13,13 +13,16 @@ hvm + + qemu64 + destroy restart destroy /usr/bin/qemu-system-x86_64 - +
diff --git a/tests/qemuxml2argvdata/hugepages-default.xml b/tests/qemuxml2a= rgvdata/hugepages-default.xml index de1006b7d7..9e4568bcf3 100644 --- a/tests/qemuxml2argvdata/hugepages-default.xml +++ b/tests/qemuxml2argvdata/hugepages-default.xml @@ -11,17 +11,27 @@ hvm + + qemu64 + destroy restart destroy /usr/bin/qemu-system-x86_64 - - + +
+ + +
+ - +