[PATCH] tests: drop dead code from argv2xml and xml2xml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Noticed while tweaking the RelaxNG grammar for <disk> elements.

* tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-static-vcpu-no-numatune.xml:
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml:
Drop unused files.
* tests/qemuargv2xmltest.c (testInfo, DO_TEST_FULL): Drop unused
field.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---

Pushing under the trivial rule.

 tests/qemuargv2xmltest.c                           | 16 +++++------
 .../qemuxml2xmlout-disk-cdrom-empty.xml            | 32 ----------------------
 ...emuxml2xmlout-numad-static-vcpu-no-numatune.xml | 29 --------------------
 3 files changed, 7 insertions(+), 70 deletions(-)
 delete mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml
 delete mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-static-vcpu-no-numatune.xml

diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c
index 4cc3749..0fc9fcb 100644
--- a/tests/qemuargv2xmltest.c
+++ b/tests/qemuargv2xmltest.c
@@ -95,7 +95,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
 struct testInfo {
     const char *name;
     unsigned long long extraFlags;
-    const char *migrateFrom;
 };

 static int
@@ -137,16 +136,16 @@ mymain(void)
     if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
         return EXIT_FAILURE;

-# define DO_TEST_FULL(name, extraFlags, migrateFrom)                    \
+# define DO_TEST_FULL(name, extraFlags)                                 \
     do {                                                                \
-        const struct testInfo info = { name, extraFlags, migrateFrom }; \
+        const struct testInfo info = { name, extraFlags };              \
         if (virtTestRun("QEMU ARGV-2-XML " name,                        \
                         testCompareXMLToArgvHelper, &info) < 0)         \
             ret = -1;                                                   \
     } while (0)

 # define DO_TEST(name)                                                  \
-        DO_TEST_FULL(name, 0, NULL)
+        DO_TEST_FULL(name, 0)

     setenv("PATH", "/bin", 1);
     setenv("USER", "test", 1);
@@ -264,12 +263,11 @@ mymain(void)

     DO_TEST("nosharepages");

-    DO_TEST_FULL("restore-v1", 0, "stdio");
-    DO_TEST_FULL("restore-v2", 0, "stdio");
-    DO_TEST_FULL("restore-v2", 0, "exec:cat");
-    DO_TEST_FULL("migrate", 0, "tcp:10.0.0.1:5000");
+    DO_TEST("restore-v1");
+    DO_TEST("restore-v2");
+    DO_TEST("migrate");

-    DO_TEST_FULL("qemu-ns-no-env", 1, NULL);
+    DO_TEST_FULL("qemu-ns-no-env", 1);

     virObjectUnref(driver.config);
     virObjectUnref(driver.caps);
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml
deleted file mode 100644
index 2c5a81a..0000000
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219100</memory>
-  <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static'>1</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</emulator>
-    <disk type='block' device='disk'>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <disk type='file' device='cdrom'>
-      <target dev='hdc' bus='ide'/>
-      <source startupPolicy='optional'/>
-      <readonly/>
-      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
-    <memballoon model='virtio'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-static-vcpu-no-numatune.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-static-vcpu-no-numatune.xml
deleted file mode 100644
index 71c1497..0000000
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-static-vcpu-no-numatune.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219136</memory>
-  <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>2</vcpu>
-  <os>
-    <type arch='i686' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <cpu>
-    <topology sockets='2' cores='1' threads='1'/>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu</emulator>
-    <disk type='block' device='disk'>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='ide' index='0'/>
-    <controller type='usb' index='0'/>
-    <memballoon model='virtio'/>
-  </devices>
-</domain>
-- 
1.9.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]