From da9a421e53b68d479b026a7181be031667c7bed3 Mon Sep 17 00:00:00 2001 Message-Id: From: Pavel Hrdina Date: Mon, 13 Aug 2018 18:16:05 +0200 Subject: [PATCH] tests: extract hugepages-numa-default-dimm out of hugepages-numa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Hrdina (cherry picked from commit c8a8c7ebbabb0d96bf18a7e75e99efbd8ccc6d50) Conflicts: tests/qemuxml2argvdata/hugepages-numa-default-dimm.args - missing upstream commit Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1591235 Signed-off-by: Pavel Hrdina Reviewed-by: Ján Tomko --- .../hugepages-numa-default-dimm.args | 31 +++++++++++++ .../hugepages-numa-default-dimm.xml | 45 +++++++++++++++++++ tests/qemuxml2argvdata/hugepages-numa.args | 6 +-- tests/qemuxml2argvdata/hugepages-numa.xml | 11 ----- tests/qemuxml2argvtest.c | 2 + .../hugepages-numa-default-dimm.xml | 1 + tests/qemuxml2xmltest.c | 1 + 7 files changed, 81 insertions(+), 16 deletions(-) create mode 100644 tests/qemuxml2argvdata/hugepages-numa-default-dimm.args create mode 100644 tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args new file mode 100644 index 0000000000..855966a137 --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args @@ -0,0 +1,31 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name fedora \ +-S \ +-machine pc-i440fx-2.3,accel=tcg,usb=off,dump-guest-core=off \ +-m size=1048576k,slots=16,maxmem=1099511627776k \ +-smp 2,sockets=2,cores=1,threads=1 \ +-mem-prealloc \ +-mem-path /dev/hugepages2M/libvirt/qemu/-1-fedora \ +-numa node,nodeid=0,cpus=0-1,mem=1024 \ +-object memory-backend-file,id=memdimm0,prealloc=yes,\ +mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,\ +host-nodes=1-3,policy=bind \ +-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ +-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-fedora/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot c \ +-usb diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml new file mode 100644 index 0000000000..14a3368678 --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml @@ -0,0 +1,45 @@ + + fedora + 63840878-0deb-4095-97e6-fc444d9bc9fa + 1099511627776 + 1572863 + 1048576 + + + + 2 + + hvm + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + + + + + + + 1-3 + 1048576 + + + 1048576 + 0 + +
+ + + diff --git a/tests/qemuxml2argvdata/hugepages-numa.args b/tests/qemuxml2argvdata/hugepages-numa.args index aa834f5511..20c7802fd8 100644 --- a/tests/qemuxml2argvdata/hugepages-numa.args +++ b/tests/qemuxml2argvdata/hugepages-numa.args @@ -8,15 +8,11 @@ QEMU_AUDIO_DRV=spice \ -name fedora \ -S \ -machine pc-i440fx-2.3,accel=tcg,usb=off,dump-guest-core=off \ --m size=1048576k,slots=16,maxmem=1099511627776k \ +-m 1024 \ -smp 2,sockets=2,cores=1,threads=1 \ -mem-prealloc \ -mem-path /dev/hugepages2M/libvirt/qemu/-1-fedora \ -numa node,nodeid=0,cpus=0-1,mem=1024 \ --object memory-backend-file,id=memdimm0,prealloc=yes,\ -mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,\ -host-nodes=1-3,policy=bind \ --device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ -no-user-config \ -nodefaults \ diff --git a/tests/qemuxml2argvdata/hugepages-numa.xml b/tests/qemuxml2argvdata/hugepages-numa.xml index eef471b4ec..d3c6308be0 100644 --- a/tests/qemuxml2argvdata/hugepages-numa.xml +++ b/tests/qemuxml2argvdata/hugepages-numa.xml @@ -1,7 +1,6 @@ fedora 63840878-0deb-4095-97e6-fc444d9bc9fa - 1099511627776 1572863 1048576 @@ -97,15 +96,5 @@
- - - 1-3 - 1048576 - - - 1048576 - 0 - - diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 01553ada38..a97b48525a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -953,6 +953,8 @@ mymain(void) QEMU_CAPS_SPICE, QEMU_CAPS_DEVICE_QXL, QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_USB_REDIR, + QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST("hugepages-numa-default-dimm", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST("hugepages-pages", diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml b/tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml new file mode 120000 index 0000000000..8fa2b323aa --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-numa-default-dimm.xml \ No newline at end of file diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index f0cabc422d..5900f4de61 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -331,6 +331,7 @@ mymain(void) DO_TEST("pmu-feature-off", NONE); DO_TEST("hugepages-default", NONE); + DO_TEST("hugepages-numa-default-dimm", NONE); DO_TEST("hugepages-pages", NONE); DO_TEST("hugepages-pages2", NONE); DO_TEST("hugepages-pages3", NONE); -- 2.18.0