render / rpms / libvirt

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