From 5617c1d30faf7ec6fc9276dbd369070b3eaf01ea Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 19 Jul 2018 13:46:05 +0200 Subject: [PATCH] tests: qemuxml2argv: Unify network cdrom source testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unify most of the tests into a common test named disk-cdrom-network by adding multiple cdroms. The 'http' test is dropped since there can be only 4 cdroms. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- .../disk-cdrom-network-ftp.args | 27 -------------- .../disk-cdrom-network-ftp.xml | 36 ------------------- .../disk-cdrom-network-ftps.args | 27 -------------- .../disk-cdrom-network-ftps.xml | 36 ------------------- .../disk-cdrom-network-http.args | 27 -------------- .../disk-cdrom-network-http.xml | 36 ------------------- .../disk-cdrom-network-tftp.args | 27 -------------- .../disk-cdrom-network-tftp.xml | 36 ------------------- ...ork-https.args => disk-cdrom-network.args} | 9 +++++ ...twork-https.xml => disk-cdrom-network.xml} | 27 ++++++++++++++ tests/qemuxml2argvtest.c | 6 +--- 11 files changed, 37 insertions(+), 257 deletions(-) delete mode 100644 tests/qemuxml2argvdata/disk-cdrom-network-ftp.args delete mode 100644 tests/qemuxml2argvdata/disk-cdrom-network-ftp.xml delete mode 100644 tests/qemuxml2argvdata/disk-cdrom-network-ftps.args delete mode 100644 tests/qemuxml2argvdata/disk-cdrom-network-ftps.xml delete mode 100644 tests/qemuxml2argvdata/disk-cdrom-network-http.args delete mode 100644 tests/qemuxml2argvdata/disk-cdrom-network-http.xml delete mode 100644 tests/qemuxml2argvdata/disk-cdrom-network-tftp.args delete mode 100644 tests/qemuxml2argvdata/disk-cdrom-network-tftp.xml rename tests/qemuxml2argvdata/{disk-cdrom-network-https.args => disk-cdrom-network.args} (58%) rename tests/qemuxml2argvdata/{disk-cdrom-network-https.xml => disk-cdrom-network.xml} (52%) diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-ftp.args b/tests/qemuxml2argvdata/disk-cdrom-network-ftp.args deleted file mode 100644 index e9eab22aaf..0000000000 --- a/tests/qemuxml2argvdata/disk-cdrom-network-ftp.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-x86_64 \ --name QEMUGuest1 \ --S \ --machine pc-1.2,accel=kvm,usb=off,dump-guest-core=off \ --m 1024 \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --boot d \ --usb \ --drive file=ftp://host.name:21/url/path/file.iso,format=raw,if=none,\ -id=drive-ide0-1-0,media=cdrom,readonly=on \ --device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-ftp.xml b/tests/qemuxml2argvdata/disk-cdrom-network-ftp.xml deleted file mode 100644 index b4e3311606..0000000000 --- a/tests/qemuxml2argvdata/disk-cdrom-network-ftp.xml +++ /dev/null @@ -1,36 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 1048576 - 1048576 - 1 - - hvm - - - - - - - - - destroy - restart - restart - - /usr/bin/qemu-system-x86_64 - - - - - - - -
- - - - - - - diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-ftps.args b/tests/qemuxml2argvdata/disk-cdrom-network-ftps.args deleted file mode 100644 index d334f7938f..0000000000 --- a/tests/qemuxml2argvdata/disk-cdrom-network-ftps.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-x86_64 \ --name QEMUGuest1 \ --S \ --machine pc-1.2,accel=kvm,usb=off,dump-guest-core=off \ --m 1024 \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --boot d \ --usb \ --drive file=ftps://host.name:990/url/path/file.iso,format=raw,if=none,\ -id=drive-ide0-1-0,media=cdrom,readonly=on \ --device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-ftps.xml b/tests/qemuxml2argvdata/disk-cdrom-network-ftps.xml deleted file mode 100644 index 4e6ca1bad1..0000000000 --- a/tests/qemuxml2argvdata/disk-cdrom-network-ftps.xml +++ /dev/null @@ -1,36 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 1048576 - 1048576 - 1 - - hvm - - - - - - - - - destroy - restart - restart - - /usr/bin/qemu-system-x86_64 - - - - - - - -
- - - - - - - diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-http.args b/tests/qemuxml2argvdata/disk-cdrom-network-http.args deleted file mode 100644 index cca0c6c3be..0000000000 --- a/tests/qemuxml2argvdata/disk-cdrom-network-http.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-x86_64 \ --name QEMUGuest1 \ --S \ --machine pc-1.2,accel=kvm,usb=off,dump-guest-core=off \ --m 1024 \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --boot d \ --usb \ --drive file=http://host.name:80/url/path/file.iso,format=raw,if=none,\ -id=drive-ide0-1-0,media=cdrom,readonly=on \ --device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-http.xml b/tests/qemuxml2argvdata/disk-cdrom-network-http.xml deleted file mode 100644 index 0eed65672b..0000000000 --- a/tests/qemuxml2argvdata/disk-cdrom-network-http.xml +++ /dev/null @@ -1,36 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 1048576 - 1048576 - 1 - - hvm - - - - - - - - - destroy - restart - restart - - /usr/bin/qemu-system-x86_64 - - - - - - - -
- - - - - - - diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-tftp.args b/tests/qemuxml2argvdata/disk-cdrom-network-tftp.args deleted file mode 100644 index 8882c2c915..0000000000 --- a/tests/qemuxml2argvdata/disk-cdrom-network-tftp.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-x86_64 \ --name QEMUGuest1 \ --S \ --machine pc-1.2,accel=kvm,usb=off,dump-guest-core=off \ --m 1024 \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --boot d \ --usb \ --drive file=tftp://host.name:69/url/path/file.iso,format=raw,if=none,\ -id=drive-ide0-1-0,media=cdrom,readonly=on \ --device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-tftp.xml b/tests/qemuxml2argvdata/disk-cdrom-network-tftp.xml deleted file mode 100644 index 1c3b185b00..0000000000 --- a/tests/qemuxml2argvdata/disk-cdrom-network-tftp.xml +++ /dev/null @@ -1,36 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 1048576 - 1048576 - 1 - - hvm - - - - - - - - - destroy - restart - restart - - /usr/bin/qemu-system-x86_64 - - - - - - - -
- - - - - - - diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-https.args b/tests/qemuxml2argvdata/disk-cdrom-network.args similarity index 58% rename from tests/qemuxml2argvdata/disk-cdrom-network-https.args rename to tests/qemuxml2argvdata/disk-cdrom-network.args index b62186270f..6dee39e3fd 100644 --- a/tests/qemuxml2argvdata/disk-cdrom-network-https.args +++ b/tests/qemuxml2argvdata/disk-cdrom-network.args @@ -21,7 +21,16 @@ server,nowait \ -no-shutdown \ -boot d \ -usb \ +-drive file=ftp://host.name:21/url/path/file.iso,format=raw,if=none,\ +id=drive-ide0-0-0,media=cdrom,readonly=on \ +-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ +-drive file=ftps://host.name:990/url/path/file.iso,format=raw,if=none,\ +id=drive-ide0-0-1,media=cdrom,readonly=on \ +-device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \ -drive file=https://host.name:443/url/path/file.iso,format=raw,if=none,\ id=drive-ide0-1-0,media=cdrom,readonly=on \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ +-drive file=tftp://host.name:69/url/path/file.iso,format=raw,if=none,\ +id=drive-ide0-1-1,media=cdrom,readonly=on \ +-device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/disk-cdrom-network-https.xml b/tests/qemuxml2argvdata/disk-cdrom-network.xml similarity index 52% rename from tests/qemuxml2argvdata/disk-cdrom-network-https.xml rename to tests/qemuxml2argvdata/disk-cdrom-network.xml index cd92fe44a8..0bdc0e1883 100644 --- a/tests/qemuxml2argvdata/disk-cdrom-network-https.xml +++ b/tests/qemuxml2argvdata/disk-cdrom-network.xml @@ -19,6 +19,24 @@ restart /usr/bin/qemu-system-x86_64 + + + + + + + +
+ + + + + + + + +
+ @@ -28,6 +46,15 @@
+ + + + + + + +
+ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 4bf826177f..44b6245747 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -990,11 +990,7 @@ mymain(void) DO_TEST("nosharepages", QEMU_CAPS_MEM_MERGE); DO_TEST("disk-cdrom", NONE); DO_TEST("disk-iscsi", NONE); - DO_TEST("disk-cdrom-network-http", QEMU_CAPS_KVM); - DO_TEST("disk-cdrom-network-https", QEMU_CAPS_KVM); - DO_TEST("disk-cdrom-network-ftp", QEMU_CAPS_KVM); - DO_TEST("disk-cdrom-network-ftps", QEMU_CAPS_KVM); - DO_TEST("disk-cdrom-network-tftp", QEMU_CAPS_KVM); + DO_TEST("disk-cdrom-network", QEMU_CAPS_KVM); DO_TEST("disk-cdrom-empty", NONE); DO_TEST("disk-cdrom-tray", QEMU_CAPS_VIRTIO_TX_ALG);