From nobody Sun Feb 8 18:09:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1533818359710295.9290493606587; Thu, 9 Aug 2018 05:39:19 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 96080300287C; Thu, 9 Aug 2018 12:39:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6460F17C05; Thu, 9 Aug 2018 12:39:17 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 140123F7CC; Thu, 9 Aug 2018 12:39:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w79Cd30q002911 for ; Thu, 9 Aug 2018 08:39:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8AE902166BA2; Thu, 9 Aug 2018 12:39:03 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2882D2166BA8 for ; Thu, 9 Aug 2018 12:39:03 +0000 (UTC) From: Pavel Hrdina To: libvir-list@redhat.com Date: Thu, 9 Aug 2018 14:38:47 +0200 Message-Id: <52831cdfe3457dd528874e6eaa6c3b3c0eb9f1ab.1533818183.git.phrdina@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 15/20] tests: introduce hugepages-default-1G-nodeset-2M X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 09 Aug 2018 12:39:18 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This test case is currently working but it uncovers existing issue in our code that the generated QEMU commandline uses the default 1G hugepage instead of the 2M hugepage specified for exact node. The issue in our code is that for non-numa guests we take into account only the first hugepage. This will be fixed as invalid configuration since it doesn't make any sense to set default and specific hugepage for non-numa guest. Signed-off-by: Pavel Hrdina --- .../hugepages-default-1G-nodeset-2M.args | 26 ++++++++++++++++ .../hugepages-default-1G-nodeset-2M.xml | 31 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + .../hugepages-default-1G-nodeset-2M.xml | 1 + tests/qemuxml2xmltest.c | 1 + 5 files changed, 60 insertions(+) create mode 100644 tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.= args create mode 100644 tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.= xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-default-1G-nodeset-2= M.xml diff --git a/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.args b/= tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.args new file mode 100644 index 0000000000..d1f8974032 --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.args @@ -0,0 +1,26 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name SomeDummyHugepagesGuest \ +-S \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 1024 \ +-mem-prealloc \ +-mem-path /dev/hugepages1G/libvirt/qemu/-1-SomeDummyHugepagesGu \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,\ +path=3D/tmp/lib/domain--1-SomeDummyHugepagesGu/monitor.sock,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot c \ +-usb diff --git a/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.xml b/t= ests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.xml new file mode 100644 index 0000000000..eb0943b105 --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.xml @@ -0,0 +1,31 @@ + + SomeDummyHugepagesGuest + ef1bdff4-27f3-4e85-a807-5fb4d58463cc + 1048576 + 1048576 + + + + + + + 2 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + +
+ + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 54bcfdf3f7..273be61db3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -974,6 +974,7 @@ mymain(void) DO_TEST("hugepages-default", NONE); DO_TEST("hugepages-default-2M", NONE); DO_TEST("hugepages-default-system-size", NONE); + DO_TEST("hugepages-default-1G-nodeset-2M", NONE); DO_TEST_FAILURE("hugepages-nodeset-nonexist", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_OBJECT_MEMORY_FILE, diff --git a/tests/qemuxml2xmloutdata/hugepages-default-1G-nodeset-2M.xml b= /tests/qemuxml2xmloutdata/hugepages-default-1G-nodeset-2M.xml new file mode 120000 index 0000000000..3d8eb7616e --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-default-1G-nodeset-2M.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-default-1G-nodeset-2M.xml \ No newline at end of file diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 0b965d3401..958b955810 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -335,6 +335,7 @@ mymain(void) DO_TEST("hugepages-default", NONE); DO_TEST("hugepages-default-2M", NONE); DO_TEST("hugepages-default-system-size", NONE); + DO_TEST("hugepages-default-1G-nodeset-2M", NONE); DO_TEST("hugepages-numa-default-2M", NONE); DO_TEST("hugepages-numa-default-dimm", NONE); DO_TEST("hugepages-numa-nodeset", NONE); --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list