render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c401cc
From a7dde5ebb2d4119e190d07907c2ac00f29775c84 Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <a7dde5ebb2d4119e190d07907c2ac00f29775c84@dist-git>
c401cc
From: Peter Krempa <pkrempa@redhat.com>
c401cc
Date: Wed, 26 Feb 2014 14:55:06 +0100
c401cc
Subject: [PATCH] domainsnapshotxml2xml: Move files with conflicting names
c401cc
c401cc
https://bugzilla.redhat.com/show_bug.cgi?id=1032370
c401cc
c401cc
The new tests that will be added later would collide with files of
c401cc
existing tests. Move and rename those files.
c401cc
c401cc
(cherry picked from commit 630adbe08d37bfa06054c122d846f4f7352db9fb)
c401cc
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 tests/domainsnapshotxml2xmlout/disk_snapshot.xml   | 80 ----------------------
c401cc
 .../disk_snapshot_redefine.xml                     | 80 ++++++++++++++++++++++
c401cc
 tests/domainsnapshotxml2xmlout/external_vm.xml     | 44 ------------
c401cc
 .../external_vm_redefine.xml                       | 44 ++++++++++++
c401cc
 tests/domainsnapshotxml2xmltest.c                  |  4 +-
c401cc
 5 files changed, 126 insertions(+), 126 deletions(-)
c401cc
 delete mode 100644 tests/domainsnapshotxml2xmlout/disk_snapshot.xml
c401cc
 create mode 100644 tests/domainsnapshotxml2xmlout/disk_snapshot_redefine.xml
c401cc
 delete mode 100644 tests/domainsnapshotxml2xmlout/external_vm.xml
c401cc
 create mode 100644 tests/domainsnapshotxml2xmlout/external_vm_redefine.xml
c401cc
c401cc
diff --git a/tests/domainsnapshotxml2xmlout/disk_snapshot.xml b/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
c401cc
deleted file mode 100644
c401cc
index 5f42bf5..0000000
c401cc
--- a/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
c401cc
+++ /dev/null
c401cc
@@ -1,80 +0,0 @@
c401cc
-<domainsnapshot>
c401cc
-  <name>my snap name</name>
c401cc
-  <description>!@#$%^</description>
c401cc
-  <state>disk-snapshot</state>
c401cc
-  <parent>
c401cc
-    <name>earlier_snap</name>
c401cc
-  </parent>
c401cc
-  <creationTime>1272917631</creationTime>
c401cc
-  <memory snapshot='no'/>
c401cc
-  <disks>
c401cc
-    <disk name='hda' snapshot='no'/>
c401cc
-    <disk name='hdb' snapshot='no'/>
c401cc
-    <disk name='hdc' snapshot='internal'/>
c401cc
-    <disk name='hdd' snapshot='external'>
c401cc
-      <driver type='qed'/>
c401cc
-      <source file='/path/to/generated4'/>
c401cc
-    </disk>
c401cc
-    <disk name='hde' snapshot='external'>
c401cc
-      <driver type='qcow2'/>
c401cc
-      <source file='/path/to/new'/>
c401cc
-    </disk>
c401cc
-    <disk name='hdf' snapshot='external'>
c401cc
-      <driver type='qcow2'/>
c401cc
-      <source file='/path/to/generated5'/>
c401cc
-    </disk>
c401cc
-  </disks>
c401cc
-  <domain type='qemu'>
c401cc
-    <name>QEMUGuest1</name>
c401cc
-    <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
c401cc
-    <memory unit='KiB'>219100</memory>
c401cc
-    <currentMemory unit='KiB'>219100</currentMemory>
c401cc
-    <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
c401cc
-    <os>
c401cc
-      <type arch='i686' machine='pc'>hvm</type>
c401cc
-      <boot dev='hd'/>
c401cc
-    </os>
c401cc
-    <clock offset='utc'/>
c401cc
-    <on_poweroff>destroy</on_poweroff>
c401cc
-    <on_reboot>restart</on_reboot>
c401cc
-    <on_crash>destroy</on_crash>
c401cc
-    <devices>
c401cc
-      <emulator>/usr/bin/qemu</emulator>
c401cc
-      <disk type='block' device='disk'>
c401cc
-        <source dev='/dev/HostVG/QEMUGuest1'/>
c401cc
-        <target dev='hda' bus='ide'/>
c401cc
-        <address type='drive' controller='0' bus='0' target='0' unit='0'/>
c401cc
-      </disk>
c401cc
-      <disk type='block' device='disk'>
c401cc
-        <source dev='/dev/HostVG/QEMUGuest2'/>
c401cc
-        <target dev='hdb' bus='ide'/>
c401cc
-        <address type='drive' controller='0' bus='1' target='0' unit='0'/>
c401cc
-      </disk>
c401cc
-      <disk type='block' device='disk'>
c401cc
-        <source dev='/dev/HostVG/QEMUGuest3'/>
c401cc
-        <target dev='hdc' bus='ide'/>
c401cc
-        <address type='drive' controller='0' bus='2' target='0' unit='0'/>
c401cc
-      </disk>
c401cc
-      <disk type='block' device='disk'>
c401cc
-        <source dev='/dev/HostVG/QEMUGuest4'/>
c401cc
-        <target dev='hdd' bus='ide'/>
c401cc
-        <address type='drive' controller='0' bus='3' target='0' unit='0'/>
c401cc
-      </disk>
c401cc
-      <disk type='block' device='disk'>
c401cc
-        <source dev='/dev/HostVG/QEMUGuest5'/>
c401cc
-        <target dev='hde' bus='ide'/>
c401cc
-        <address type='drive' controller='0' bus='4' target='0' unit='0'/>
c401cc
-      </disk>
c401cc
-      <disk type='block' device='disk'>
c401cc
-        <source dev='/dev/HostVG/QEMUGuest6'/>
c401cc
-        <target dev='hdf' bus='ide'/>
c401cc
-        <address type='drive' controller='0' bus='5' target='0' unit='0'/>
c401cc
-      </disk>
c401cc
-      <controller type='usb' index='0'/>
c401cc
-      <controller type='ide' index='0'/>
c401cc
-      <controller type='pci' index='0' model='pci-root'/>
c401cc
-      <memballoon model='virtio'/>
c401cc
-    </devices>
c401cc
-  </domain>
c401cc
-  <active>1</active>
c401cc
-</domainsnapshot>
c401cc
diff --git a/tests/domainsnapshotxml2xmlout/disk_snapshot_redefine.xml b/tests/domainsnapshotxml2xmlout/disk_snapshot_redefine.xml
c401cc
new file mode 100644
c401cc
index 0000000..5f42bf5
c401cc
--- /dev/null
c401cc
+++ b/tests/domainsnapshotxml2xmlout/disk_snapshot_redefine.xml
c401cc
@@ -0,0 +1,80 @@
c401cc
+<domainsnapshot>
c401cc
+  <name>my snap name</name>
c401cc
+  <description>!@#$%^</description>
c401cc
+  <state>disk-snapshot</state>
c401cc
+  <parent>
c401cc
+    <name>earlier_snap</name>
c401cc
+  </parent>
c401cc
+  <creationTime>1272917631</creationTime>
c401cc
+  <memory snapshot='no'/>
c401cc
+  <disks>
c401cc
+    <disk name='hda' snapshot='no'/>
c401cc
+    <disk name='hdb' snapshot='no'/>
c401cc
+    <disk name='hdc' snapshot='internal'/>
c401cc
+    <disk name='hdd' snapshot='external'>
c401cc
+      <driver type='qed'/>
c401cc
+      <source file='/path/to/generated4'/>
c401cc
+    </disk>
c401cc
+    <disk name='hde' snapshot='external'>
c401cc
+      <driver type='qcow2'/>
c401cc
+      <source file='/path/to/new'/>
c401cc
+    </disk>
c401cc
+    <disk name='hdf' snapshot='external'>
c401cc
+      <driver type='qcow2'/>
c401cc
+      <source file='/path/to/generated5'/>
c401cc
+    </disk>
c401cc
+  </disks>
c401cc
+  <domain type='qemu'>
c401cc
+    <name>QEMUGuest1</name>
c401cc
+    <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
c401cc
+    <memory unit='KiB'>219100</memory>
c401cc
+    <currentMemory unit='KiB'>219100</currentMemory>
c401cc
+    <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
c401cc
+    <os>
c401cc
+      <type arch='i686' machine='pc'>hvm</type>
c401cc
+      <boot dev='hd'/>
c401cc
+    </os>
c401cc
+    <clock offset='utc'/>
c401cc
+    <on_poweroff>destroy</on_poweroff>
c401cc
+    <on_reboot>restart</on_reboot>
c401cc
+    <on_crash>destroy</on_crash>
c401cc
+    <devices>
c401cc
+      <emulator>/usr/bin/qemu</emulator>
c401cc
+      <disk type='block' device='disk'>
c401cc
+        <source dev='/dev/HostVG/QEMUGuest1'/>
c401cc
+        <target dev='hda' bus='ide'/>
c401cc
+        <address type='drive' controller='0' bus='0' target='0' unit='0'/>
c401cc
+      </disk>
c401cc
+      <disk type='block' device='disk'>
c401cc
+        <source dev='/dev/HostVG/QEMUGuest2'/>
c401cc
+        <target dev='hdb' bus='ide'/>
c401cc
+        <address type='drive' controller='0' bus='1' target='0' unit='0'/>
c401cc
+      </disk>
c401cc
+      <disk type='block' device='disk'>
c401cc
+        <source dev='/dev/HostVG/QEMUGuest3'/>
c401cc
+        <target dev='hdc' bus='ide'/>
c401cc
+        <address type='drive' controller='0' bus='2' target='0' unit='0'/>
c401cc
+      </disk>
c401cc
+      <disk type='block' device='disk'>
c401cc
+        <source dev='/dev/HostVG/QEMUGuest4'/>
c401cc
+        <target dev='hdd' bus='ide'/>
c401cc
+        <address type='drive' controller='0' bus='3' target='0' unit='0'/>
c401cc
+      </disk>
c401cc
+      <disk type='block' device='disk'>
c401cc
+        <source dev='/dev/HostVG/QEMUGuest5'/>
c401cc
+        <target dev='hde' bus='ide'/>
c401cc
+        <address type='drive' controller='0' bus='4' target='0' unit='0'/>
c401cc
+      </disk>
c401cc
+      <disk type='block' device='disk'>
c401cc
+        <source dev='/dev/HostVG/QEMUGuest6'/>
c401cc
+        <target dev='hdf' bus='ide'/>
c401cc
+        <address type='drive' controller='0' bus='5' target='0' unit='0'/>
c401cc
+      </disk>
c401cc
+      <controller type='usb' index='0'/>
c401cc
+      <controller type='ide' index='0'/>
c401cc
+      <controller type='pci' index='0' model='pci-root'/>
c401cc
+      <memballoon model='virtio'/>
c401cc
+    </devices>
c401cc
+  </domain>
c401cc
+  <active>1</active>
c401cc
+</domainsnapshot>
c401cc
diff --git a/tests/domainsnapshotxml2xmlout/external_vm.xml b/tests/domainsnapshotxml2xmlout/external_vm.xml
c401cc
deleted file mode 100644
c401cc
index 5a87ba6..0000000
c401cc
--- a/tests/domainsnapshotxml2xmlout/external_vm.xml
c401cc
+++ /dev/null
c401cc
@@ -1,44 +0,0 @@
c401cc
-<domainsnapshot>
c401cc
-  <name>my snap name</name>
c401cc
-  <description>!@#$%^</description>
c401cc
-  <state>running</state>
c401cc
-  <parent>
c401cc
-    <name>earlier_snap</name>
c401cc
-  </parent>
c401cc
-  <creationTime>1272917631</creationTime>
c401cc
-  <memory snapshot='external' file='/dev/HostVG/GuestMemory'/>
c401cc
-  <disks>
c401cc
-    <disk name='hda' snapshot='no'/>
c401cc
-  </disks>
c401cc
-  <domain type='qemu'>
c401cc
-    <name>QEMUGuest1</name>
c401cc
-    <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
c401cc
-    <metadata>
c401cc
-      <app1:foo xmlns:app1="http://foo.org/">fooish</app1:foo>
c401cc
-      <app2:bar xmlns:app2="http://bar.com/" maman="baz">barish</app2:bar>
c401cc
-    </metadata>
c401cc
-    <memory unit='KiB'>219100</memory>
c401cc
-    <currentMemory unit='KiB'>219100</currentMemory>
c401cc
-    <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
c401cc
-    <os>
c401cc
-      <type arch='i686' machine='pc'>hvm</type>
c401cc
-      <boot dev='hd'/>
c401cc
-    </os>
c401cc
-    <clock offset='utc'/>
c401cc
-    <on_poweroff>destroy</on_poweroff>
c401cc
-    <on_reboot>restart</on_reboot>
c401cc
-    <on_crash>destroy</on_crash>
c401cc
-    <devices>
c401cc
-      <emulator>/usr/bin/qemu</emulator>
c401cc
-      <disk type='block' device='disk' snapshot='no'>
c401cc
-        <source dev='/dev/HostVG/QEMUGuest1'/>
c401cc
-        <target dev='hda' bus='ide'/>
c401cc
-        <address type='drive' controller='0' bus='0' target='0' unit='0'/>
c401cc
-      </disk>
c401cc
-      <controller type='usb' index='0'/>
c401cc
-      <controller type='ide' index='0'/>
c401cc
-      <controller type='pci' index='0' model='pci-root'/>
c401cc
-      <memballoon model='virtio'/>
c401cc
-    </devices>
c401cc
-  </domain>
c401cc
-</domainsnapshot>
c401cc
diff --git a/tests/domainsnapshotxml2xmlout/external_vm_redefine.xml b/tests/domainsnapshotxml2xmlout/external_vm_redefine.xml
c401cc
new file mode 100644
c401cc
index 0000000..5a87ba6
c401cc
--- /dev/null
c401cc
+++ b/tests/domainsnapshotxml2xmlout/external_vm_redefine.xml
c401cc
@@ -0,0 +1,44 @@
c401cc
+<domainsnapshot>
c401cc
+  <name>my snap name</name>
c401cc
+  <description>!@#$%^</description>
c401cc
+  <state>running</state>
c401cc
+  <parent>
c401cc
+    <name>earlier_snap</name>
c401cc
+  </parent>
c401cc
+  <creationTime>1272917631</creationTime>
c401cc
+  <memory snapshot='external' file='/dev/HostVG/GuestMemory'/>
c401cc
+  <disks>
c401cc
+    <disk name='hda' snapshot='no'/>
c401cc
+  </disks>
c401cc
+  <domain type='qemu'>
c401cc
+    <name>QEMUGuest1</name>
c401cc
+    <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
c401cc
+    <metadata>
c401cc
+      <app1:foo xmlns:app1="http://foo.org/">fooish</app1:foo>
c401cc
+      <app2:bar xmlns:app2="http://bar.com/" maman="baz">barish</app2:bar>
c401cc
+    </metadata>
c401cc
+    <memory unit='KiB'>219100</memory>
c401cc
+    <currentMemory unit='KiB'>219100</currentMemory>
c401cc
+    <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
c401cc
+    <os>
c401cc
+      <type arch='i686' machine='pc'>hvm</type>
c401cc
+      <boot dev='hd'/>
c401cc
+    </os>
c401cc
+    <clock offset='utc'/>
c401cc
+    <on_poweroff>destroy</on_poweroff>
c401cc
+    <on_reboot>restart</on_reboot>
c401cc
+    <on_crash>destroy</on_crash>
c401cc
+    <devices>
c401cc
+      <emulator>/usr/bin/qemu</emulator>
c401cc
+      <disk type='block' device='disk' snapshot='no'>
c401cc
+        <source dev='/dev/HostVG/QEMUGuest1'/>
c401cc
+        <target dev='hda' bus='ide'/>
c401cc
+        <address type='drive' controller='0' bus='0' target='0' unit='0'/>
c401cc
+      </disk>
c401cc
+      <controller type='usb' index='0'/>
c401cc
+      <controller type='ide' index='0'/>
c401cc
+      <controller type='pci' index='0' model='pci-root'/>
c401cc
+      <memballoon model='virtio'/>
c401cc
+    </devices>
c401cc
+  </domain>
c401cc
+</domainsnapshot>
c401cc
diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xmltest.c
c401cc
index 3140029..4a1fcce 100644
c401cc
--- a/tests/domainsnapshotxml2xmltest.c
c401cc
+++ b/tests/domainsnapshotxml2xmltest.c
c401cc
@@ -207,13 +207,13 @@ mymain(void)
c401cc
     setenv("PATH", "/bin", 1);
c401cc
 
c401cc
     DO_TEST_OUT("all_parameters", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", true);
c401cc
-    DO_TEST_OUT("disk_snapshot", "c7a5fdbd-edaf-9455-926a-d65c16db1809", true);
c401cc
+    DO_TEST_OUT("disk_snapshot_redefine", "c7a5fdbd-edaf-9455-926a-d65c16db1809", true);
c401cc
     DO_TEST_OUT("full_domain", "c7a5fdbd-edaf-9455-926a-d65c16db1809", true);
c401cc
     DO_TEST_OUT("noparent_nodescription_noactive", NULL, false);
c401cc
     DO_TEST_OUT("noparent_nodescription", NULL, true);
c401cc
     DO_TEST_OUT("noparent", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false);
c401cc
     DO_TEST_OUT("metadata", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
c401cc
-    DO_TEST_OUT("external_vm", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
c401cc
+    DO_TEST_OUT("external_vm_redefine", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
c401cc
 
c401cc
 cleanup:
c401cc
     if (testSnapshotXMLVariableLineRegex)
c401cc
-- 
c401cc
1.9.0
c401cc