render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
982648
From bbfd839091e67153b9479e546914b819efed807a Mon Sep 17 00:00:00 2001
982648
Message-Id: <bbfd839091e67153b9479e546914b819efed807a@dist-git>
982648
From: Pavel Hrdina <phrdina@redhat.com>
982648
Date: Mon, 13 Aug 2018 18:16:16 +0200
982648
Subject: [PATCH] tests: rename hugepages-pages7 into pages-dimm-discard
982648
MIME-Version: 1.0
982648
Content-Type: text/plain; charset=UTF-8
982648
Content-Transfer-Encoding: 8bit
982648
982648
Remove unnecessary XML elements as well.
982648
982648
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
982648
(cherry picked from commit 7e0ac26867da8b3b1464b7649a53fdd6dde8d9ab)
982648
982648
Conflicts:
982648
    tests/qemuxml2argvdata/pages-dimm-discard.args
982648
        - missing upstream commit <caccbba64a>
982648
982648
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1591235
982648
982648
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
982648
Reviewed-by: Ján Tomko <jtomko@redhat.com>
982648
---
982648
 ...ges-pages7.args => pages-dimm-discard.args} | 16 +++++-----------
982648
 ...pages-pages7.xml => pages-dimm-discard.xml} | 18 +-----------------
982648
 tests/qemuxml2argvtest.c                       |  7 ++++---
982648
 tests/qemuxml2xmloutdata/hugepages-pages7.xml  |  1 -
982648
 .../qemuxml2xmloutdata/pages-dimm-discard.xml  |  1 +
982648
 tests/qemuxml2xmltest.c                        |  2 +-
982648
 6 files changed, 12 insertions(+), 33 deletions(-)
982648
 rename tests/qemuxml2argvdata/{hugepages-pages7.args => pages-dimm-discard.args} (65%)
982648
 rename tests/qemuxml2argvdata/{hugepages-pages7.xml => pages-dimm-discard.xml} (73%)
982648
 delete mode 120000 tests/qemuxml2xmloutdata/hugepages-pages7.xml
982648
 create mode 120000 tests/qemuxml2xmloutdata/pages-dimm-discard.xml
982648
982648
diff --git a/tests/qemuxml2argvdata/hugepages-pages7.args b/tests/qemuxml2argvdata/pages-dimm-discard.args
982648
similarity index 65%
982648
rename from tests/qemuxml2argvdata/hugepages-pages7.args
982648
rename to tests/qemuxml2argvdata/pages-dimm-discard.args
982648
index 02a98026eb..97184e074a 100644
982648
--- a/tests/qemuxml2argvdata/hugepages-pages7.args
982648
+++ b/tests/qemuxml2argvdata/pages-dimm-discard.args
982648
@@ -10,16 +10,14 @@ QEMU_AUDIO_DRV=none \
982648
 -machine pc-i440fx-2.3,accel=tcg,usb=off,dump-guest-core=off \
982648
 -m size=1048576k,slots=16,maxmem=1099511627776k \
982648
 -smp 2,sockets=2,cores=1,threads=1 \
982648
--mem-prealloc \
982648
--mem-path /dev/hugepages2M/libvirt/qemu/-1-fedora \
982648
 -numa node,nodeid=0,cpus=0-1,mem=1024 \
982648
 -object memory-backend-file,id=memdimm0,prealloc=yes,\
982648
 mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,\
982648
 host-nodes=1-3,policy=bind \
982648
 -device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \
982648
--object memory-backend-file,id=memdimm1,prealloc=yes,\
982648
-mem-path=/dev/hugepages2M/libvirt/qemu/-1-fedora,discard-data=yes,share=no,\
982648
-size=536870912 \
982648
+-object memory-backend-file,id=memdimm1,\
982648
+mem-path=/var/lib/libvirt/qemu/ram/libvirt/qemu/-1-fedora/dimm1,\
982648
+discard-data=yes,share=no,size=536870912 \
982648
 -device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \
982648
 -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
982648
 -display none \
982648
@@ -30,10 +28,6 @@ server,nowait \
982648
 -mon chardev=charmonitor,id=monitor,mode=control \
982648
 -rtc base=utc \
982648
 -no-shutdown \
982648
+-no-acpi \
982648
 -boot c \
982648
--usb \
982648
--drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,\
982648
-id=drive-virtio-disk0 \
982648
--device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,\
982648
-id=virtio-disk0 \
982648
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
982648
+-usb
982648
diff --git a/tests/qemuxml2argvdata/hugepages-pages7.xml b/tests/qemuxml2argvdata/pages-dimm-discard.xml
982648
similarity index 73%
982648
rename from tests/qemuxml2argvdata/hugepages-pages7.xml
982648
rename to tests/qemuxml2argvdata/pages-dimm-discard.xml
982648
index 28c72f85a7..3d233687e1 100644
982648
--- a/tests/qemuxml2argvdata/hugepages-pages7.xml
982648
+++ b/tests/qemuxml2argvdata/pages-dimm-discard.xml
982648
@@ -4,19 +4,11 @@
982648
   <maxMemory slots='16' unit='KiB'>1099511627776</maxMemory>
982648
   <memory unit='KiB'>2621439</memory>
982648
   <currentMemory unit='KiB'>2621439</currentMemory>
982648
-  <memoryBacking>
982648
-    <hugepages/>
982648
-  </memoryBacking>
982648
   <vcpu placement='static'>2</vcpu>
982648
   <os>
982648
     <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
982648
     <boot dev='hd'/>
982648
   </os>
982648
-  <features>
982648
-    <acpi/>
982648
-    <apic/>
982648
-    <pae/>
982648
-  </features>
982648
   <cpu>
982648
     <numa>
982648
       <cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
982648
@@ -28,21 +20,13 @@
982648
   <on_crash>restart</on_crash>
982648
   <devices>
982648
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
982648
-    <disk type='file' device='disk'>
982648
-      <driver name='qemu' type='qcow2'/>
982648
-      <source file='/var/lib/libvirt/images/fedora.qcow2'/>
982648
-      <target dev='vda' bus='virtio'/>
982648
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
982648
-    </disk>
982648
     <controller type='usb' index='0'>
982648
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
982648
     </controller>
982648
     <controller type='pci' index='0' model='pci-root'/>
982648
     <input type='mouse' bus='ps2'/>
982648
     <input type='keyboard' bus='ps2'/>
982648
-    <memballoon model='virtio'>
982648
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
982648
-    </memballoon>
982648
+    <memballoon model='none'/>
982648
     <memory model='dimm' discard='no'>
982648
       <source>
982648
         <nodemask>1-3</nodemask>
982648
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
982648
index 1aab23408d..f8fbca1806 100644
982648
--- a/tests/qemuxml2argvtest.c
982648
+++ b/tests/qemuxml2argvtest.c
982648
@@ -952,6 +952,10 @@ mymain(void)
982648
             QEMU_CAPS_OBJECT_MEMORY_RAM,
982648
             QEMU_CAPS_OBJECT_MEMORY_FILE,
982648
             QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD);
982648
+    DO_TEST("pages-dimm-discard",
982648
+            QEMU_CAPS_DEVICE_PC_DIMM,
982648
+            QEMU_CAPS_OBJECT_MEMORY_FILE,
982648
+            QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD);
982648
     DO_TEST("hugepages-default", NONE);
982648
     DO_TEST("hugepages-default-2M", NONE);
982648
     DO_TEST("hugepages-default-system-size", NONE);
982648
@@ -976,9 +980,6 @@ mymain(void)
982648
             QEMU_CAPS_OBJECT_MEMORY_RAM,
982648
             QEMU_CAPS_OBJECT_MEMORY_FILE);
982648
     DO_TEST_PARSE_ERROR("hugepages-memaccess-invalid", NONE);
982648
-    DO_TEST("hugepages-pages7",
982648
-            QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_OBJECT_MEMORY_FILE,
982648
-            QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD);
982648
     DO_TEST_FAILURE("hugepages-pages8",
982648
                     QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_OBJECT_MEMORY_FILE,
982648
                     QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD);
982648
diff --git a/tests/qemuxml2xmloutdata/hugepages-pages7.xml b/tests/qemuxml2xmloutdata/hugepages-pages7.xml
982648
deleted file mode 120000
982648
index b4ce4defda..0000000000
982648
--- a/tests/qemuxml2xmloutdata/hugepages-pages7.xml
982648
+++ /dev/null
982648
@@ -1 +0,0 @@
982648
-../qemuxml2argvdata/hugepages-pages7.xml
982648
\ No newline at end of file
982648
diff --git a/tests/qemuxml2xmloutdata/pages-dimm-discard.xml b/tests/qemuxml2xmloutdata/pages-dimm-discard.xml
982648
new file mode 120000
982648
index 0000000000..05bbef8d65
982648
--- /dev/null
982648
+++ b/tests/qemuxml2xmloutdata/pages-dimm-discard.xml
982648
@@ -0,0 +1 @@
982648
+../qemuxml2argvdata/pages-dimm-discard.xml
982648
\ No newline at end of file
982648
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
982648
index a3555b348e..6afc48f98e 100644
982648
--- a/tests/qemuxml2xmltest.c
982648
+++ b/tests/qemuxml2xmltest.c
982648
@@ -332,6 +332,7 @@ mymain(void)
982648
 
982648
     DO_TEST("pages-discard", NONE);
982648
     DO_TEST("pages-discard-hugepages", NONE);
982648
+    DO_TEST("pages-dimm-discard", NONE);
982648
     DO_TEST("hugepages-default", NONE);
982648
     DO_TEST("hugepages-default-2M", NONE);
982648
     DO_TEST("hugepages-default-system-size", NONE);
982648
@@ -340,7 +341,6 @@ mymain(void)
982648
     DO_TEST("hugepages-numa-nodeset", NONE);
982648
     DO_TEST("hugepages-numa-nodeset-part", NONE);
982648
     DO_TEST("hugepages-numa-nodeset-nonexist", NONE);
982648
-    DO_TEST("hugepages-pages7", NONE);
982648
     DO_TEST("hugepages-shared", NONE);
982648
     DO_TEST("hugepages-memaccess", NONE);
982648
     DO_TEST("hugepages-memaccess2", NONE);
982648
-- 
982648
2.18.0
982648