[libvirt] [PATCH] qemuxml2xmloutdata: Use more symlinks

Michal Privoznik posted 1 patch 5 years, 7 months ago
Failed in applying to current master (apply log)
tests/qemuxml2xmloutdata/boot-floppy-q35.xml       | 33 +---------------
tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml  | 33 +---------------
tests/qemuxml2xmloutdata/disk-virtio-queues.xml    | 35 +---------------
tests/qemuxml2xmloutdata/intel-iommu-machine.xml   | 27 +------------
tests/qemuxml2xmloutdata/intel-iommu.xml           | 27 +------------
tests/qemuxml2xmloutdata/luks-disks.xml            | 46 +---------------------
tests/qemuxml2xmloutdata/vcpu-placement-static.xml | 34 +---------------
7 files changed, 7 insertions(+), 228 deletions(-)
mode change 100644 => 120000 tests/qemuxml2xmloutdata/boot-floppy-q35.xml
mode change 100644 => 120000 tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml
mode change 100644 => 120000 tests/qemuxml2xmloutdata/disk-virtio-queues.xml
mode change 100644 => 120000 tests/qemuxml2xmloutdata/intel-iommu-machine.xml
mode change 100644 => 120000 tests/qemuxml2xmloutdata/intel-iommu.xml
mode change 100644 => 120000 tests/qemuxml2xmloutdata/luks-disks.xml
mode change 100644 => 120000 tests/qemuxml2xmloutdata/vcpu-placement-static.xml
[libvirt] [PATCH] qemuxml2xmloutdata: Use more symlinks
Posted by Michal Privoznik 5 years, 7 months ago
There are couple of files that are the same in both
qemuxml2argvdata and qemuxml2xmloutdata directories. Link them
instead of having full copy.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 tests/qemuxml2xmloutdata/boot-floppy-q35.xml       | 33 +---------------
 tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml  | 33 +---------------
 tests/qemuxml2xmloutdata/disk-virtio-queues.xml    | 35 +---------------
 tests/qemuxml2xmloutdata/intel-iommu-machine.xml   | 27 +------------
 tests/qemuxml2xmloutdata/intel-iommu.xml           | 27 +------------
 tests/qemuxml2xmloutdata/luks-disks.xml            | 46 +---------------------
 tests/qemuxml2xmloutdata/vcpu-placement-static.xml | 34 +---------------
 7 files changed, 7 insertions(+), 228 deletions(-)
 mode change 100644 => 120000 tests/qemuxml2xmloutdata/boot-floppy-q35.xml
 mode change 100644 => 120000 tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml
 mode change 100644 => 120000 tests/qemuxml2xmloutdata/disk-virtio-queues.xml
 mode change 100644 => 120000 tests/qemuxml2xmloutdata/intel-iommu-machine.xml
 mode change 100644 => 120000 tests/qemuxml2xmloutdata/intel-iommu.xml
 mode change 100644 => 120000 tests/qemuxml2xmloutdata/luks-disks.xml
 mode change 100644 => 120000 tests/qemuxml2xmloutdata/vcpu-placement-static.xml

diff --git a/tests/qemuxml2xmloutdata/boot-floppy-q35.xml b/tests/qemuxml2xmloutdata/boot-floppy-q35.xml
deleted file mode 100644
index af685d9c98..0000000000
--- a/tests/qemuxml2xmloutdata/boot-floppy-q35.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='x86_64' machine='pc-q35-2.4'>hvm</type>
-    <boot dev='fd'/>
-  </os>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='file' device='floppy'>
-      <driver name='qemu' type='raw'/>
-      <source file='/tmp/firmware.img'/>
-      <target dev='fda' bus='fdc'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='sata' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
-    </controller>
-    <controller type='pci' index='0' model='pcie-root'/>
-    <controller type='fdc' index='0'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/boot-floppy-q35.xml b/tests/qemuxml2xmloutdata/boot-floppy-q35.xml
new file mode 120000
index 0000000000..2543835ffb
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/boot-floppy-q35.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/boot-floppy-q35.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml b/tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml
deleted file mode 100644
index af685d9c98..0000000000
--- a/tests/qemuxml2xmloutdata/bootindex-floppy-q35.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='x86_64' machine='pc-q35-2.4'>hvm</type>
-    <boot dev='fd'/>
-  </os>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='file' device='floppy'>
-      <driver name='qemu' type='raw'/>
-      <source file='/tmp/firmware.img'/>
-      <target dev='fda' bus='fdc'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='sata' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
-    </controller>
-    <controller type='pci' index='0' model='pcie-root'/>
-    <controller type='fdc' index='0'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml b/tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml
new file mode 120000
index 0000000000..0ab2dad20f
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/bootindex-floppy-q35.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/disk-virtio-queues.xml b/tests/qemuxml2xmloutdata/disk-virtio-queues.xml
deleted file mode 100644
index 37885c6f9c..0000000000
--- a/tests/qemuxml2xmloutdata/disk-virtio-queues.xml
+++ /dev/null
@@ -1,34 +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'>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-system-i686</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw' queues='4'/>
-      <source file='/tmp/data.img'/>
-      <target dev='vda' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/disk-virtio-queues.xml b/tests/qemuxml2xmloutdata/disk-virtio-queues.xml
new file mode 120000
index 0000000000..d6773202b7
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/disk-virtio-queues.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/disk-virtio-queues.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/intel-iommu-machine.xml b/tests/qemuxml2xmloutdata/intel-iommu-machine.xml
deleted file mode 100644
index 0961e4288d..0000000000
--- a/tests/qemuxml2xmloutdata/intel-iommu-machine.xml
+++ /dev/null
@@ -1,26 +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='x86_64' machine='q35'>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-system-x86_64</emulator>
-    <controller type='pci' index='0' model='pcie-root'/>
-    <controller type='sata' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
-    </controller>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='none'/>
-    <iommu model='intel'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/intel-iommu-machine.xml b/tests/qemuxml2xmloutdata/intel-iommu-machine.xml
new file mode 120000
index 0000000000..dd29ce5ff0
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/intel-iommu-machine.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/intel-iommu-machine.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/intel-iommu.xml b/tests/qemuxml2xmloutdata/intel-iommu.xml
deleted file mode 100644
index 0961e4288d..0000000000
--- a/tests/qemuxml2xmloutdata/intel-iommu.xml
+++ /dev/null
@@ -1,26 +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='x86_64' machine='q35'>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-system-x86_64</emulator>
-    <controller type='pci' index='0' model='pcie-root'/>
-    <controller type='sata' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
-    </controller>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='none'/>
-    <iommu model='intel'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/intel-iommu.xml b/tests/qemuxml2xmloutdata/intel-iommu.xml
new file mode 120000
index 0000000000..97f38b1296
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/intel-iommu.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/intel-iommu.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/luks-disks.xml b/tests/qemuxml2xmloutdata/luks-disks.xml
deleted file mode 100644
index c84af442a6..0000000000
--- a/tests/qemuxml2xmloutdata/luks-disks.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<domain type='qemu'>
-  <name>encryptdisk</name>
-  <uuid>496898a6-e6ff-f7c8-5dc2-3cf410945ee9</uuid>
-  <memory unit='KiB'>1048576</memory>
-  <currentMemory unit='KiB'>524288</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc-i440fx-2.1'>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-system-x86_64</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source file='/storage/guest_disks/encryptdisk'/>
-      <target dev='vda' bus='virtio'/>
-      <encryption format='luks'>
-        <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/>
-      </encryption>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source file='/storage/guest_disks/encryptdisk2'/>
-      <target dev='vdb' bus='virtio'/>
-      <encryption format='luks'>
-        <secret type='passphrase' usage='/storage/guest_disks/encryptdisk2'/>
-      </encryption>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/luks-disks.xml b/tests/qemuxml2xmloutdata/luks-disks.xml
new file mode 120000
index 0000000000..d65e470c32
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/luks-disks.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/luks-disks.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/vcpu-placement-static.xml b/tests/qemuxml2xmloutdata/vcpu-placement-static.xml
deleted file mode 100644
index a777f50f86..0000000000
--- a/tests/qemuxml2xmloutdata/vcpu-placement-static.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<domain type='kvm'>
-  <name>dummy2</name>
-  <uuid>4d92ec27-9ebf-400b-ae91-20c71c647c19</uuid>
-  <memory unit='KiB'>131072</memory>
-  <currentMemory unit='KiB'>65536</currentMemory>
-  <vcpu placement='static' current='2'>6</vcpu>
-  <iothreads>2</iothreads>
-  <cputune>
-    <emulatorpin cpuset='1-3'/>
-    <iothreadpin iothread='1' cpuset='2'/>
-  </cputune>
-  <numatune>
-    <memory mode='strict' placement='auto'/>
-  </numatune>
-  <os>
-    <type arch='x86_64' machine='pc-q35-2.3'>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-system-x86_64</emulator>
-    <controller type='sata' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
-    </controller>
-    <controller type='pci' index='0' model='pcie-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/vcpu-placement-static.xml b/tests/qemuxml2xmloutdata/vcpu-placement-static.xml
new file mode 120000
index 0000000000..9966cf47a7
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/vcpu-placement-static.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/vcpu-placement-static.xml
\ No newline at end of file
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemuxml2xmloutdata: Use more symlinks
Posted by Ján Tomko 5 years, 7 months ago
On Thu, Aug 09, 2018 at 04:50:58PM +0200, Michal Privoznik wrote:
>There are couple of files that are the same in both
>qemuxml2argvdata and qemuxml2xmloutdata directories. Link them
>instead of having full copy.
>
>Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>---
> tests/qemuxml2xmloutdata/boot-floppy-q35.xml       | 33 +---------------
> tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml  | 33 +---------------

These two are a) identical to each other b) one of them will be made
redundant after Peter pushes the BOOTINDEX capability changes.
If you wait until he pushes it, there might be one less change needed in
this commit.

> tests/qemuxml2xmloutdata/disk-virtio-queues.xml    | 35 +---------------
> tests/qemuxml2xmloutdata/intel-iommu-machine.xml   | 27 +------------
> tests/qemuxml2xmloutdata/intel-iommu.xml           | 27 +------------

These are also identical. It makes sense for them to point to their
respective source counterparts. But the followup question is, whether we
want to make the source files point to each other.

> tests/qemuxml2xmloutdata/luks-disks.xml            | 46 +---------------------
> tests/qemuxml2xmloutdata/vcpu-placement-static.xml | 34 +---------------
> 7 files changed, 7 insertions(+), 228 deletions(-)
> mode change 100644 => 120000 tests/qemuxml2xmloutdata/boot-floppy-q35.xml
> mode change 100644 => 120000 tests/qemuxml2xmloutdata/bootindex-floppy-q35.xml
> mode change 100644 => 120000 tests/qemuxml2xmloutdata/disk-virtio-queues.xml
> mode change 100644 => 120000 tests/qemuxml2xmloutdata/intel-iommu-machine.xml
> mode change 100644 => 120000 tests/qemuxml2xmloutdata/intel-iommu.xml
> mode change 100644 => 120000 tests/qemuxml2xmloutdata/luks-disks.xml
> mode change 100644 => 120000 tests/qemuxml2xmloutdata/vcpu-placement-static.xml
>

One way or another:
Reviewed-by: Ján Tomko <jtomko@redhat.com>

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