From becdbd9b2155dccde29cfa859c4948cf9f8cab8a Mon Sep 17 00:00:00 2001 Message-Id: From: Pavel Hrdina Date: Mon, 13 Aug 2018 19:21:51 +0200 Subject: [PATCH] tests: introduce hugepages-nodeset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This use-case was broken by commit . We allowed this configuration and it was working as expected therefore we can consider it as regression. We should have never allowed such configuration so now the best solution is in case of non-numa guest silently ignore the 'nodeset' attribute if it's set to '0'. That will be fixed by following patches. Signed-off-by: Pavel Hrdina (cherry picked from commit 154b08a3a7b1f16fefefcc106982a062c065eacd) Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1615461 Signed-off-by: Pavel Hrdina Reviewed-by: Ján Tomko --- tests/qemuxml2argvdata/hugepages-nodeset.xml | 30 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + .../qemuxml2xmloutdata/hugepages-nodeset.xml | 1 + tests/qemuxml2xmltest.c | 1 + 4 files changed, 33 insertions(+) create mode 100644 tests/qemuxml2argvdata/hugepages-nodeset.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-nodeset.xml diff --git a/tests/qemuxml2argvdata/hugepages-nodeset.xml b/tests/qemuxml2argvdata/hugepages-nodeset.xml new file mode 100644 index 0000000000..4a85ddffad --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-nodeset.xml @@ -0,0 +1,30 @@ + + 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 f92c46cec5..bd5fdf9412 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -960,6 +960,7 @@ mymain(void) 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", NONE); DO_TEST_FAILURE("hugepages-nodeset-nonexist", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_OBJECT_MEMORY_FILE, diff --git a/tests/qemuxml2xmloutdata/hugepages-nodeset.xml b/tests/qemuxml2xmloutdata/hugepages-nodeset.xml new file mode 120000 index 0000000000..b55838b780 --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-nodeset.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-nodeset.xml \ No newline at end of file diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 6ba8f97e20..acbe2f7133 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -337,6 +337,7 @@ mymain(void) DO_TEST("hugepages-default-2M", NONE); DO_TEST("hugepages-default-system-size", NONE); DO_TEST("hugepages-default-1G-nodeset-2M", NONE); + DO_TEST("hugepages-nodeset", NONE); DO_TEST("hugepages-numa-default-2M", NONE); DO_TEST("hugepages-numa-default-dimm", NONE); DO_TEST("hugepages-numa-nodeset", NONE); -- 2.18.0