Blob Blame History Raw
From a7dde5ebb2d4119e190d07907c2ac00f29775c84 Mon Sep 17 00:00:00 2001
Message-Id: <a7dde5ebb2d4119e190d07907c2ac00f29775c84@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Wed, 26 Feb 2014 14:55:06 +0100
Subject: [PATCH] domainsnapshotxml2xml: Move files with conflicting names

https://bugzilla.redhat.com/show_bug.cgi?id=1032370

The new tests that will be added later would collide with files of
existing tests. Move and rename those files.

(cherry picked from commit 630adbe08d37bfa06054c122d846f4f7352db9fb)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 tests/domainsnapshotxml2xmlout/disk_snapshot.xml   | 80 ----------------------
 .../disk_snapshot_redefine.xml                     | 80 ++++++++++++++++++++++
 tests/domainsnapshotxml2xmlout/external_vm.xml     | 44 ------------
 .../external_vm_redefine.xml                       | 44 ++++++++++++
 tests/domainsnapshotxml2xmltest.c                  |  4 +-
 5 files changed, 126 insertions(+), 126 deletions(-)
 delete mode 100644 tests/domainsnapshotxml2xmlout/disk_snapshot.xml
 create mode 100644 tests/domainsnapshotxml2xmlout/disk_snapshot_redefine.xml
 delete mode 100644 tests/domainsnapshotxml2xmlout/external_vm.xml
 create mode 100644 tests/domainsnapshotxml2xmlout/external_vm_redefine.xml

diff --git a/tests/domainsnapshotxml2xmlout/disk_snapshot.xml b/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
deleted file mode 100644
index 5f42bf5..0000000
--- a/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<domainsnapshot>
-  <name>my snap name</name>
-  <description>!@#$%^</description>
-  <state>disk-snapshot</state>
-  <parent>
-    <name>earlier_snap</name>
-  </parent>
-  <creationTime>1272917631</creationTime>
-  <memory snapshot='no'/>
-  <disks>
-    <disk name='hda' snapshot='no'/>
-    <disk name='hdb' snapshot='no'/>
-    <disk name='hdc' snapshot='internal'/>
-    <disk name='hdd' snapshot='external'>
-      <driver type='qed'/>
-      <source file='/path/to/generated4'/>
-    </disk>
-    <disk name='hde' snapshot='external'>
-      <driver type='qcow2'/>
-      <source file='/path/to/new'/>
-    </disk>
-    <disk name='hdf' snapshot='external'>
-      <driver type='qcow2'/>
-      <source file='/path/to/generated5'/>
-    </disk>
-  </disks>
-  <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' cpuset='1-4,8-20,525'>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='block' device='disk'>
-        <source dev='/dev/HostVG/QEMUGuest2'/>
-        <target dev='hdb' bus='ide'/>
-        <address type='drive' controller='0' bus='1' target='0' unit='0'/>
-      </disk>
-      <disk type='block' device='disk'>
-        <source dev='/dev/HostVG/QEMUGuest3'/>
-        <target dev='hdc' bus='ide'/>
-        <address type='drive' controller='0' bus='2' target='0' unit='0'/>
-      </disk>
-      <disk type='block' device='disk'>
-        <source dev='/dev/HostVG/QEMUGuest4'/>
-        <target dev='hdd' bus='ide'/>
-        <address type='drive' controller='0' bus='3' target='0' unit='0'/>
-      </disk>
-      <disk type='block' device='disk'>
-        <source dev='/dev/HostVG/QEMUGuest5'/>
-        <target dev='hde' bus='ide'/>
-        <address type='drive' controller='0' bus='4' target='0' unit='0'/>
-      </disk>
-      <disk type='block' device='disk'>
-        <source dev='/dev/HostVG/QEMUGuest6'/>
-        <target dev='hdf' bus='ide'/>
-        <address type='drive' controller='0' bus='5' target='0' unit='0'/>
-      </disk>
-      <controller type='usb' index='0'/>
-      <controller type='ide' index='0'/>
-      <controller type='pci' index='0' model='pci-root'/>
-      <memballoon model='virtio'/>
-    </devices>
-  </domain>
-  <active>1</active>
-</domainsnapshot>
diff --git a/tests/domainsnapshotxml2xmlout/disk_snapshot_redefine.xml b/tests/domainsnapshotxml2xmlout/disk_snapshot_redefine.xml
new file mode 100644
index 0000000..5f42bf5
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlout/disk_snapshot_redefine.xml
@@ -0,0 +1,80 @@
+<domainsnapshot>
+  <name>my snap name</name>
+  <description>!@#$%^</description>
+  <state>disk-snapshot</state>
+  <parent>
+    <name>earlier_snap</name>
+  </parent>
+  <creationTime>1272917631</creationTime>
+  <memory snapshot='no'/>
+  <disks>
+    <disk name='hda' snapshot='no'/>
+    <disk name='hdb' snapshot='no'/>
+    <disk name='hdc' snapshot='internal'/>
+    <disk name='hdd' snapshot='external'>
+      <driver type='qed'/>
+      <source file='/path/to/generated4'/>
+    </disk>
+    <disk name='hde' snapshot='external'>
+      <driver type='qcow2'/>
+      <source file='/path/to/new'/>
+    </disk>
+    <disk name='hdf' snapshot='external'>
+      <driver type='qcow2'/>
+      <source file='/path/to/generated5'/>
+    </disk>
+  </disks>
+  <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' cpuset='1-4,8-20,525'>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='block' device='disk'>
+        <source dev='/dev/HostVG/QEMUGuest2'/>
+        <target dev='hdb' bus='ide'/>
+        <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+      </disk>
+      <disk type='block' device='disk'>
+        <source dev='/dev/HostVG/QEMUGuest3'/>
+        <target dev='hdc' bus='ide'/>
+        <address type='drive' controller='0' bus='2' target='0' unit='0'/>
+      </disk>
+      <disk type='block' device='disk'>
+        <source dev='/dev/HostVG/QEMUGuest4'/>
+        <target dev='hdd' bus='ide'/>
+        <address type='drive' controller='0' bus='3' target='0' unit='0'/>
+      </disk>
+      <disk type='block' device='disk'>
+        <source dev='/dev/HostVG/QEMUGuest5'/>
+        <target dev='hde' bus='ide'/>
+        <address type='drive' controller='0' bus='4' target='0' unit='0'/>
+      </disk>
+      <disk type='block' device='disk'>
+        <source dev='/dev/HostVG/QEMUGuest6'/>
+        <target dev='hdf' bus='ide'/>
+        <address type='drive' controller='0' bus='5' target='0' unit='0'/>
+      </disk>
+      <controller type='usb' index='0'/>
+      <controller type='ide' index='0'/>
+      <controller type='pci' index='0' model='pci-root'/>
+      <memballoon model='virtio'/>
+    </devices>
+  </domain>
+  <active>1</active>
+</domainsnapshot>
diff --git a/tests/domainsnapshotxml2xmlout/external_vm.xml b/tests/domainsnapshotxml2xmlout/external_vm.xml
deleted file mode 100644
index 5a87ba6..0000000
--- a/tests/domainsnapshotxml2xmlout/external_vm.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<domainsnapshot>
-  <name>my snap name</name>
-  <description>!@#$%^</description>
-  <state>running</state>
-  <parent>
-    <name>earlier_snap</name>
-  </parent>
-  <creationTime>1272917631</creationTime>
-  <memory snapshot='external' file='/dev/HostVG/GuestMemory'/>
-  <disks>
-    <disk name='hda' snapshot='no'/>
-  </disks>
-  <domain type='qemu'>
-    <name>QEMUGuest1</name>
-    <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-    <metadata>
-      <app1:foo xmlns:app1="http://foo.org/">fooish</app1:foo>
-      <app2:bar xmlns:app2="http://bar.com/" maman="baz">barish</app2:bar>
-    </metadata>
-    <memory unit='KiB'>219100</memory>
-    <currentMemory unit='KiB'>219100</currentMemory>
-    <vcpu placement='static' cpuset='1-4,8-20,525'>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' snapshot='no'>
-        <source dev='/dev/HostVG/QEMUGuest1'/>
-        <target dev='hda' bus='ide'/>
-        <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-      </disk>
-      <controller type='usb' index='0'/>
-      <controller type='ide' index='0'/>
-      <controller type='pci' index='0' model='pci-root'/>
-      <memballoon model='virtio'/>
-    </devices>
-  </domain>
-</domainsnapshot>
diff --git a/tests/domainsnapshotxml2xmlout/external_vm_redefine.xml b/tests/domainsnapshotxml2xmlout/external_vm_redefine.xml
new file mode 100644
index 0000000..5a87ba6
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlout/external_vm_redefine.xml
@@ -0,0 +1,44 @@
+<domainsnapshot>
+  <name>my snap name</name>
+  <description>!@#$%^</description>
+  <state>running</state>
+  <parent>
+    <name>earlier_snap</name>
+  </parent>
+  <creationTime>1272917631</creationTime>
+  <memory snapshot='external' file='/dev/HostVG/GuestMemory'/>
+  <disks>
+    <disk name='hda' snapshot='no'/>
+  </disks>
+  <domain type='qemu'>
+    <name>QEMUGuest1</name>
+    <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+    <metadata>
+      <app1:foo xmlns:app1="http://foo.org/">fooish</app1:foo>
+      <app2:bar xmlns:app2="http://bar.com/" maman="baz">barish</app2:bar>
+    </metadata>
+    <memory unit='KiB'>219100</memory>
+    <currentMemory unit='KiB'>219100</currentMemory>
+    <vcpu placement='static' cpuset='1-4,8-20,525'>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' snapshot='no'>
+        <source dev='/dev/HostVG/QEMUGuest1'/>
+        <target dev='hda' bus='ide'/>
+        <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+      </disk>
+      <controller type='usb' index='0'/>
+      <controller type='ide' index='0'/>
+      <controller type='pci' index='0' model='pci-root'/>
+      <memballoon model='virtio'/>
+    </devices>
+  </domain>
+</domainsnapshot>
diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xmltest.c
index 3140029..4a1fcce 100644
--- a/tests/domainsnapshotxml2xmltest.c
+++ b/tests/domainsnapshotxml2xmltest.c
@@ -207,13 +207,13 @@ mymain(void)
     setenv("PATH", "/bin", 1);
 
     DO_TEST_OUT("all_parameters", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", true);
-    DO_TEST_OUT("disk_snapshot", "c7a5fdbd-edaf-9455-926a-d65c16db1809", true);
+    DO_TEST_OUT("disk_snapshot_redefine", "c7a5fdbd-edaf-9455-926a-d65c16db1809", true);
     DO_TEST_OUT("full_domain", "c7a5fdbd-edaf-9455-926a-d65c16db1809", true);
     DO_TEST_OUT("noparent_nodescription_noactive", NULL, false);
     DO_TEST_OUT("noparent_nodescription", NULL, true);
     DO_TEST_OUT("noparent", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false);
     DO_TEST_OUT("metadata", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
-    DO_TEST_OUT("external_vm", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
+    DO_TEST_OUT("external_vm_redefine", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
 
 cleanup:
     if (testSnapshotXMLVariableLineRegex)
-- 
1.9.0