]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: drop dead code from argv2xml and xml2xml
authorEric Blake <eblake@redhat.com>
Fri, 11 Apr 2014 18:51:00 +0000 (12:51 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 11 Apr 2014 19:02:09 +0000 (13:02 -0600)
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@redhat.com>
tests/qemuargv2xmltest.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml [deleted file]
tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-static-vcpu-no-numatune.xml [deleted file]

index 4cc3749dab423999fc3cd2ccfbbcadc48715debc..0fc9fcb4749a41ce0f585f0efd61a9bc4cb17853 100644 (file)
@@ -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 (file)
index 2c5a81a..0000000
+++ /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 (file)
index 71c1497..0000000
+++ /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>