From 7e0ac26867da8b3b1464b7649a53fdd6dde8d9ab Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Fri, 10 Aug 2018 13:14:58 +0200 Subject: [PATCH] tests: rename hugepages-pages7 into pages-dimm-discard Remove unnecessary XML elements as well. Signed-off-by: Pavel Hrdina --- ...ges-pages7.args => pages-dimm-discard.args} | 16 +++++----------- ...pages-pages7.xml => pages-dimm-discard.xml} | 18 +----------------- tests/qemuxml2argvtest.c | 7 ++++--- tests/qemuxml2xmloutdata/hugepages-pages7.xml | 1 - .../qemuxml2xmloutdata/pages-dimm-discard.xml | 1 + tests/qemuxml2xmltest.c | 2 +- 6 files changed, 12 insertions(+), 33 deletions(-) rename tests/qemuxml2argvdata/{hugepages-pages7.args => pages-dimm-discard.args} (64%) rename tests/qemuxml2argvdata/{hugepages-pages7.xml => pages-dimm-discard.xml} (73%) delete mode 120000 tests/qemuxml2xmloutdata/hugepages-pages7.xml create mode 120000 tests/qemuxml2xmloutdata/pages-dimm-discard.xml diff --git a/tests/qemuxml2argvdata/hugepages-pages7.args b/tests/qemuxml2argvdata/pages-dimm-discard.args similarity index 64% rename from tests/qemuxml2argvdata/hugepages-pages7.args rename to tests/qemuxml2argvdata/pages-dimm-discard.args index 14eaa86dab..bec8eb4f86 100644 --- a/tests/qemuxml2argvdata/hugepages-pages7.args +++ b/tests/qemuxml2argvdata/pages-dimm-discard.args @@ -10,16 +10,14 @@ QEMU_AUDIO_DRV=none \ -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 \ --object memory-backend-file,id=memdimm1,prealloc=yes,\ -mem-path=/dev/hugepages2M/libvirt/qemu/-1-fedora,discard-data=yes,share=no,\ -size=536870912 \ +-object memory-backend-file,id=memdimm1,\ +mem-path=/var/lib/libvirt/qemu/ram/libvirt/qemu/-1-fedora/dimm1,\ +discard-data=yes,share=no,size=536870912 \ -device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \ -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ -display none \ @@ -30,9 +28,5 @@ server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ --usb \ --drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,\ -id=drive-virtio-disk0 \ --device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,\ -id=virtio-disk0,bootindex=1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 +-no-acpi \ +-usb diff --git a/tests/qemuxml2argvdata/hugepages-pages7.xml b/tests/qemuxml2argvdata/pages-dimm-discard.xml similarity index 73% rename from tests/qemuxml2argvdata/hugepages-pages7.xml rename to tests/qemuxml2argvdata/pages-dimm-discard.xml index 28c72f85a7..3d233687e1 100644 --- a/tests/qemuxml2argvdata/hugepages-pages7.xml +++ b/tests/qemuxml2argvdata/pages-dimm-discard.xml @@ -4,19 +4,11 @@ 1099511627776 2621439 2621439 - - - 2 hvm - - - - - @@ -28,21 +20,13 @@ restart /usr/bin/qemu-system-x86_64 - - - - -
-
- -
- + 1-3 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ee71ab34aa..6b57c4ee40 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -951,6 +951,10 @@ mymain(void) QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD); + DO_TEST("pages-dimm-discard", + QEMU_CAPS_DEVICE_PC_DIMM, + QEMU_CAPS_OBJECT_MEMORY_FILE, + QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD); DO_TEST("hugepages-default", NONE); DO_TEST("hugepages-default-2M", NONE); DO_TEST("hugepages-default-system-size", NONE); @@ -975,9 +979,6 @@ mymain(void) QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST_PARSE_ERROR("hugepages-memaccess-invalid", NONE); - DO_TEST("hugepages-pages7", - QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD); DO_TEST_FAILURE("hugepages-pages8", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD); diff --git a/tests/qemuxml2xmloutdata/hugepages-pages7.xml b/tests/qemuxml2xmloutdata/hugepages-pages7.xml deleted file mode 120000 index b4ce4defda..0000000000 --- a/tests/qemuxml2xmloutdata/hugepages-pages7.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/hugepages-pages7.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/pages-dimm-discard.xml b/tests/qemuxml2xmloutdata/pages-dimm-discard.xml new file mode 120000 index 0000000000..05bbef8d65 --- /dev/null +++ b/tests/qemuxml2xmloutdata/pages-dimm-discard.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/pages-dimm-discard.xml \ No newline at end of file diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 9e2ec6e1b4..64ec267948 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -327,6 +327,7 @@ mymain(void) DO_TEST("pages-discard", NONE); DO_TEST("pages-discard-hugepages", NONE); + DO_TEST("pages-dimm-discard", NONE); DO_TEST("hugepages-default", NONE); DO_TEST("hugepages-default-2M", NONE); DO_TEST("hugepages-default-system-size", NONE); @@ -335,7 +336,6 @@ mymain(void) DO_TEST("hugepages-numa-nodeset", NONE); DO_TEST("hugepages-numa-nodeset-part", NONE); DO_TEST("hugepages-numa-nodeset-nonexist", NONE); - DO_TEST("hugepages-pages7", NONE); DO_TEST("hugepages-shared", NONE); DO_TEST("hugepages-memaccess", NONE); DO_TEST("hugepages-memaccess2", NONE); -- GitLab