[libvirt] [PATCH 0/4] tests: qemuxml2argv: More unused files cleanup

Cleanup most output files unused by our test suite. See justification in individual commits. Peter Krempa (4): tests: qemuxml2argv: Remove 'args' files for tests expecting failure tests: qemuxml2argv: Make use of 'vram64' QXL device tests tests: qemuxml2argv: Remove the 'no-shutdown' test completely tests: qemuxml2argv: Remove 'args' for tests only used in xml2xmltest .../hugepages-default-1G-nodeset-2M.args | 25 ---------------- tests/qemuxml2argvdata/lease.args | 23 --------------- tests/qemuxml2argvdata/metadata.args | 22 -------------- tests/qemuxml2argvdata/no-shutdown.args | 27 ----------------- tests/qemuxml2argvdata/no-shutdown.xml | 24 --------------- tests/qemuxml2argvdata/pcihole64-none.args | 20 ------------- .../qemuxml2argvdata/video-qxl-device-vram64.args | 25 ---------------- .../video-qxl-device-vram64.x86_64-latest.args | 32 ++++++++++++++++++++ tests/qemuxml2argvdata/video-qxl-device-vram64.xml | 6 ---- .../video-qxl-sec-device-vram64.args | 27 ----------------- .../video-qxl-sec-device-vram64.x86_64-latest.args | 34 ++++++++++++++++++++++ .../video-qxl-sec-device-vram64.xml | 6 ---- tests/qemuxml2argvtest.c | 2 ++ 13 files changed, 68 insertions(+), 205 deletions(-) delete mode 100644 tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.args delete mode 100644 tests/qemuxml2argvdata/lease.args delete mode 100644 tests/qemuxml2argvdata/metadata.args delete mode 100644 tests/qemuxml2argvdata/no-shutdown.args delete mode 100644 tests/qemuxml2argvdata/no-shutdown.xml delete mode 100644 tests/qemuxml2argvdata/pcihole64-none.args delete mode 100644 tests/qemuxml2argvdata/video-qxl-device-vram64.args create mode 100644 tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/video-qxl-sec-device-vram64.args create mode 100644 tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args -- 2.16.2

Output file does not make sense for those. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../hugepages-default-1G-nodeset-2M.args | 25 ---------------------- tests/qemuxml2argvdata/pcihole64-none.args | 20 ----------------- 2 files changed, 45 deletions(-) delete mode 100644 tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.args delete mode 100644 tests/qemuxml2argvdata/pcihole64-none.args diff --git a/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.args b/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.args deleted file mode 100644 index 10c429a533..0000000000 --- a/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.args +++ /dev/null @@ -1,25 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i686 \ --name SomeDummyHugepagesGuest \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 1024 \ --mem-prealloc \ --mem-path /dev/hugepages1G/libvirt/qemu/-1-SomeDummyHugepagesGu \ --smp 2,sockets=2,cores=1,threads=1 \ --uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,\ -path=/tmp/lib/domain--1-SomeDummyHugepagesGu/monitor.sock,server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --usb diff --git a/tests/qemuxml2argvdata/pcihole64-none.args b/tests/qemuxml2argvdata/pcihole64-none.args deleted file mode 100644 index 31ca508ae5..0000000000 --- a/tests/qemuxml2argvdata/pcihole64-none.args +++ /dev/null @@ -1,20 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-x86_64 \ --name QEMUGuest1 \ --S \ --M pc-1.2 \ --m 2048 \ --smp 2 \ --uuid c84fc647-6198-4ff9-bf81-d65a1f8f5ec0 \ --nographic \ --nodefaults \ --monitor unix:/tmp/test-monitor,server,nowait \ --no-acpi \ --boot c \ --usb \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -- 2.16.2

On Mon, Aug 27, 2018 at 06:09:06PM +0200, Peter Krempa wrote:
Output file does not make sense for those.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

The test files were unused, but we don't have any other test for this feature. Make use of the existing files by removing disks and using DO_TEST_CAPS_LATEST to execute them. The legacy output files will be dropped. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../qemuxml2argvdata/video-qxl-device-vram64.args | 25 ---------------- .../video-qxl-device-vram64.x86_64-latest.args | 32 ++++++++++++++++++++ tests/qemuxml2argvdata/video-qxl-device-vram64.xml | 6 ---- .../video-qxl-sec-device-vram64.args | 27 ----------------- .../video-qxl-sec-device-vram64.x86_64-latest.args | 34 ++++++++++++++++++++++ .../video-qxl-sec-device-vram64.xml | 6 ---- tests/qemuxml2argvtest.c | 2 ++ 7 files changed, 68 insertions(+), 64 deletions(-) delete mode 100644 tests/qemuxml2argvdata/video-qxl-device-vram64.args create mode 100644 tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/video-qxl-sec-device-vram64.args create mode 100644 tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/video-qxl-device-vram64.args b/tests/qemuxml2argvdata/video-qxl-device-vram64.args deleted file mode 100644 index b9e65ea873..0000000000 --- a/tests/qemuxml2argvdata/video-qxl-device-vram64.args +++ /dev/null @@ -1,25 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-x86_64 \ --name QEMUGuest1 \ --S \ --M pc \ --m 1024 \ --smp 1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --nographic \ --nodefaults \ --monitor unix:/tmp/test-monitor,server,nowait \ --no-acpi \ --boot c \ --usb \ --drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\ -id=drive-ide0-0-0,cache=none \ --device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,\ -vram64_size_mb=128,vgamem_mb=16,bus=pci.0,addr=0x2 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args b/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args new file mode 100644 index 0000000000..913b5d45bc --- /dev/null +++ b/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 1024 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,\ +vram64_size_mb=128,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/video-qxl-device-vram64.xml b/tests/qemuxml2argvdata/video-qxl-device-vram64.xml index 1e89d06a75..2b88c9d078 100644 --- a/tests/qemuxml2argvdata/video-qxl-device-vram64.xml +++ b/tests/qemuxml2argvdata/video-qxl-device-vram64.xml @@ -14,12 +14,6 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none'/> - <source file='/var/lib/libvirt/images/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> <controller type='ide' index='0'/> <video> <model type='qxl' vram64='131072' heads='1'/> diff --git a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.args b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.args deleted file mode 100644 index 4a152c97bf..0000000000 --- a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.args +++ /dev/null @@ -1,27 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i686 \ --name QEMUGuest1 \ --S \ --M pc \ --m 1024 \ --smp 1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --nographic \ --nodefaults \ --monitor unix:/tmp/test-monitor,server,nowait \ --no-acpi \ --boot c \ --usb \ --drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\ -id=drive-ide0-0-0,cache=none \ --device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,\ -bus=pci.0,addr=0x2 \ --device qxl,id=video1,ram_size=67108864,vram_size=67108864,vram64_size_mb=128,\ -vgamem_mb=16,bus=pci.0,addr=0x4 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args new file mode 100644 index 0000000000..e7c993c907 --- /dev/null +++ b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-i686 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 1024 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,\ +vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 \ +-device qxl,id=video1,ram_size=67108864,vram_size=67108864,vram64_size_mb=128,\ +vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x4 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.xml b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.xml index c71f59731d..6bd0909c59 100644 --- a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.xml +++ b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.xml @@ -14,12 +14,6 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-i686</emulator> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2' cache='none'/> - <source file='/var/lib/libvirt/images/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> <controller type='ide' index='0'/> <video> <model type='qxl' heads='1'/> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 82b5b7bbea..16c3540798 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2007,12 +2007,14 @@ mymain(void) QEMU_CAPS_DEVICE_QXL, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_QXL_VGAMEM); + DO_TEST_CAPS_LATEST("video-qxl-device-vram64"); DO_TEST("video-qxl-sec-device", QEMU_CAPS_DEVICE_QXL, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); DO_TEST("video-qxl-sec-device-vgamem", QEMU_CAPS_DEVICE_QXL, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_QXL_VGAMEM); + DO_TEST_CAPS_LATEST("video-qxl-sec-device-vram64"); DO_TEST("video-qxl-heads", QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL, -- 2.16.2

On Mon, Aug 27, 2018 at 06:09:07PM +0200, Peter Krempa wrote:
The test files were unused, but we don't have any other test for this feature. Make use of the existing files by removing disks and using DO_TEST_CAPS_LATEST to execute them. The legacy output files will be dropped.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

Now we assume the flag always so there's no use for this test. Probably a leftover from the cleanup of the capability. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvdata/no-shutdown.args | 27 --------------------------- tests/qemuxml2argvdata/no-shutdown.xml | 24 ------------------------ 2 files changed, 51 deletions(-) delete mode 100644 tests/qemuxml2argvdata/no-shutdown.args delete mode 100644 tests/qemuxml2argvdata/no-shutdown.xml diff --git a/tests/qemuxml2argvdata/no-shutdown.args b/tests/qemuxml2argvdata/no-shutdown.args deleted file mode 100644 index 085e91162d..0000000000 --- a/tests/qemuxml2argvdata/no-shutdown.args +++ /dev/null @@ -1,27 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i686 \ --name encryptdisk \ --S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,\ -path=/tmp/lib/domain--1-encryptdisk/monitor.sock,server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot c \ --usb \ --drive file=/dev/hda1,format=qcow2,if=none,id=drive-ide0-0-0 \ --device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/no-shutdown.xml b/tests/qemuxml2argvdata/no-shutdown.xml deleted file mode 100644 index d714bae4d3..0000000000 --- a/tests/qemuxml2argvdata/no-shutdown.xml +++ /dev/null @@ -1,24 +0,0 @@ -<domain type='qemu'> - <name>encryptdisk</name> - <uuid>496898a6-e6ff-f7c8-5dc2-3cf410945ee9</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-system-i686</emulator> - <disk type='file' device='disk'> - <driver name='qemu' type='qcow2'/> - <source file='/dev/hda1'/> - <target dev='hda'/> - </disk> - <memballoon model='virtio'/> - </devices> -</domain> -- 2.16.2

On Mon, Aug 27, 2018 at 06:09:08PM +0200, Peter Krempa wrote:
Now we assume the flag always so there's no use for this test. Probably a leftover from the cleanup of the capability.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

'metadata' and 'leases' are features internal to libvirt and thus don't influence the XML. As they are not tested we don't need the output files. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvdata/lease.args | 23 ----------------------- tests/qemuxml2argvdata/metadata.args | 22 ---------------------- 2 files changed, 45 deletions(-) delete mode 100644 tests/qemuxml2argvdata/lease.args delete mode 100644 tests/qemuxml2argvdata/metadata.args diff --git a/tests/qemuxml2argvdata/lease.args b/tests/qemuxml2argvdata/lease.args deleted file mode 100644 index 000538b67e..0000000000 --- a/tests/qemuxml2argvdata/lease.args +++ /dev/null @@ -1,23 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i686 \ --name QEMUGuest1 \ --S \ --M pc \ --m 214 \ --smp 1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --nographic \ --monitor unix:/tmp/test-monitor,server,nowait \ --no-acpi \ --boot c \ --usb \ --drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \ --cdrom /root/boot.iso \ --net none \ --serial none \ --parallel none diff --git a/tests/qemuxml2argvdata/metadata.args b/tests/qemuxml2argvdata/metadata.args deleted file mode 100644 index 1fb74e47fa..0000000000 --- a/tests/qemuxml2argvdata/metadata.args +++ /dev/null @@ -1,22 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/home/test \ -USER=test \ -LOGNAME=test \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i686 \ --name QEMUGuest1 \ --S \ --M pc \ --m 214 \ --smp 1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --nographic \ --monitor unix:/tmp/test-monitor,server,nowait \ --no-acpi \ --boot c \ --usb \ --drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \ --net none \ --serial none \ --parallel none -- 2.16.2

On Mon, Aug 27, 2018 at 06:09:09PM +0200, Peter Krempa wrote:
'metadata' and 'leases' are features internal to libvirt and thus don't influence the XML. As they are not tested we don't need the output files.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

On Mon, 2018-08-27 at 18:09 +0200, Peter Krempa wrote:
'metadata' and 'leases' are features internal to libvirt and thus don't influence the XML. As they are not tested we don't need the output files.
I think you meant s/XML/generated QEMU command line/ here? -- Andrea Bolognani / Red Hat / Virtualization
participants (3)
-
Andrea Bolognani
-
Erik Skultety
-
Peter Krempa