Both of these cases were working before commit
<fa6bdf6afa878b8d7c5ed71664ee72be8967cdc5> tried to fix the case were
there is no guest NUMA configured but there is "nodeset='0'" attribute.
The case where "nodeset='1'" without any guest NUMA topology is covered
by "hugepage-pages8" test case.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tests/qemuxml2argvdata/hugepages-pages10.xml | 30 ++++++++++++++++++
tests/qemuxml2argvdata/hugepages-pages9.xml | 31 +++++++++++++++++++
tests/qemuxml2argvtest.c | 2 ++
.../qemuxml2xmloutdata/hugepages-pages10.xml | 30 ++++++++++++++++++
tests/qemuxml2xmloutdata/hugepages-pages9.xml | 31 +++++++++++++++++++
tests/qemuxml2xmltest.c | 2 ++
6 files changed, 126 insertions(+)
create mode 100644 tests/qemuxml2argvdata/hugepages-pages10.xml
create mode 100644 tests/qemuxml2argvdata/hugepages-pages9.xml
create mode 100644 tests/qemuxml2xmloutdata/hugepages-pages10.xml
create mode 100644 tests/qemuxml2xmloutdata/hugepages-pages9.xml
diff --git a/tests/qemuxml2argvdata/hugepages-pages10.xml
b/tests/qemuxml2argvdata/hugepages-pages10.xml
new file mode 100644
index 0000000000..4a85ddffad
--- /dev/null
+++ b/tests/qemuxml2argvdata/hugepages-pages10.xml
@@ -0,0 +1,30 @@
+<domain type='qemu'>
+ <name>SomeDummyHugepagesGuest</name>
+ <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <memoryBacking>
+ <hugepages>
+ <page size='2048' unit='KiB' nodeset='0'/>
+ </hugepages>
+ </memoryBacking>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-i686</emulator>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/hugepages-pages9.xml
b/tests/qemuxml2argvdata/hugepages-pages9.xml
new file mode 100644
index 0000000000..8f380c46df
--- /dev/null
+++ b/tests/qemuxml2argvdata/hugepages-pages9.xml
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+ <name>SomeDummyHugepagesGuest</name>
+ <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <memoryBacking>
+ <hugepages>
+ <page size='2048' unit='KiB' nodeset='0'/>
+ <page size='1048576' unit='KiB'/>
+ </hugepages>
+ </memoryBacking>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-i686</emulator>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a929e4314e..7236e184b8 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -978,6 +978,8 @@ mymain(void)
DO_TEST_FAILURE("hugepages-pages8",
QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_OBJECT_MEMORY_FILE,
QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD);
+ DO_TEST_FAILURE("hugepages-pages9", NONE);
+ DO_TEST_FAILURE("hugepages-pages10", NONE);
DO_TEST("hugepages-memaccess", QEMU_CAPS_OBJECT_MEMORY_FILE,
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_DEVICE_PC_DIMM,
QEMU_CAPS_NUMA);
diff --git a/tests/qemuxml2xmloutdata/hugepages-pages10.xml
b/tests/qemuxml2xmloutdata/hugepages-pages10.xml
new file mode 100644
index 0000000000..4a85ddffad
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/hugepages-pages10.xml
@@ -0,0 +1,30 @@
+<domain type='qemu'>
+ <name>SomeDummyHugepagesGuest</name>
+ <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <memoryBacking>
+ <hugepages>
+ <page size='2048' unit='KiB' nodeset='0'/>
+ </hugepages>
+ </memoryBacking>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-i686</emulator>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/hugepages-pages9.xml
b/tests/qemuxml2xmloutdata/hugepages-pages9.xml
new file mode 100644
index 0000000000..8f380c46df
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/hugepages-pages9.xml
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+ <name>SomeDummyHugepagesGuest</name>
+ <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <memoryBacking>
+ <hugepages>
+ <page size='2048' unit='KiB' nodeset='0'/>
+ <page size='1048576' unit='KiB'/>
+ </hugepages>
+ </memoryBacking>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-i686</emulator>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index c0b228515c..ae11fbe60c 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -338,6 +338,8 @@ mymain(void)
DO_TEST("hugepages-pages5", NONE);
DO_TEST("hugepages-pages6", NONE);
DO_TEST("hugepages-pages7", NONE);
+ DO_TEST("hugepages-pages9", NONE);
+ DO_TEST("hugepages-pages10", NONE);
DO_TEST("hugepages-shared", NONE);
DO_TEST("hugepages-memaccess", NONE);
DO_TEST("hugepages-memaccess2", NONE);
--
2.17.1