From: Peter Krempa Date: Thu, 19 Jul 2018 13:00:50 +0000 (+0200) Subject: tests: qemu: Unify disk cache testing X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d1c9c6bf74f6609ce9c22e0b7f9acfdd349042ac;p=libvirt.git tests: qemu: Unify disk cache testing Move the 'unsafe' cache test into 'disk-cache' and remove all the individual cases for one cache mode each. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/tests/qemuxml2argvdata/disk-cache-directsync.args b/tests/qemuxml2argvdata/disk-cache-directsync.args deleted file mode 100644 index 82b2e1a218..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-directsync.args +++ /dev/null @@ -1,30 +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 \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --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 \ --no-acpi \ --boot c \ --usb \ --drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\ -cache=directsync \ --device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --drive file=/dev/HostVG/QEMUGuest2,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 diff --git a/tests/qemuxml2argvdata/disk-cache-directsync.xml b/tests/qemuxml2argvdata/disk-cache-directsync.xml deleted file mode 100644 index e5b2ad3182..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-directsync.xml +++ /dev/null @@ -1,37 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - - - - - - - - diff --git a/tests/qemuxml2argvdata/disk-cache-unsafe.args b/tests/qemuxml2argvdata/disk-cache-unsafe.args deleted file mode 100644 index 6759a02416..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-unsafe.args +++ /dev/null @@ -1,30 +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 \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --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 \ --no-acpi \ --boot c \ --usb \ --drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\ -cache=unsafe \ --device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --drive file=/dev/HostVG/QEMUGuest2,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 diff --git a/tests/qemuxml2argvdata/disk-cache-unsafe.xml b/tests/qemuxml2argvdata/disk-cache-unsafe.xml deleted file mode 100644 index 61ca1dee2e..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-unsafe.xml +++ /dev/null @@ -1,37 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - - - - - - - - diff --git a/tests/qemuxml2argvdata/disk-cache-v2-none.args b/tests/qemuxml2argvdata/disk-cache-v2-none.args deleted file mode 100644 index 5bde2b165d..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-v2-none.args +++ /dev/null @@ -1,30 +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 \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --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 \ --no-acpi \ --boot c \ --usb \ --drive file=/dev/HostVG/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 \ --drive file=/dev/HostVG/QEMUGuest2,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 diff --git a/tests/qemuxml2argvdata/disk-cache-v2-none.xml b/tests/qemuxml2argvdata/disk-cache-v2-none.xml deleted file mode 100644 index 4499165923..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-v2-none.xml +++ /dev/null @@ -1,37 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219100 - 219100 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - - - - - - - - diff --git a/tests/qemuxml2argvdata/disk-cache-v2-wb.args b/tests/qemuxml2argvdata/disk-cache-v2-wb.args deleted file mode 100644 index 15f00b73a9..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-v2-wb.args +++ /dev/null @@ -1,30 +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 \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --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 \ --no-acpi \ --boot c \ --usb \ --drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\ -cache=writeback \ --device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --drive file=/dev/HostVG/QEMUGuest2,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 diff --git a/tests/qemuxml2argvdata/disk-cache-v2-wb.xml b/tests/qemuxml2argvdata/disk-cache-v2-wb.xml deleted file mode 100644 index 6fa9147ef5..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-v2-wb.xml +++ /dev/null @@ -1,37 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - - - - - - - - diff --git a/tests/qemuxml2argvdata/disk-cache-v2-wt.args b/tests/qemuxml2argvdata/disk-cache-v2-wt.args deleted file mode 100644 index 164c6d7c69..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-v2-wt.args +++ /dev/null @@ -1,30 +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 \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ --m 214 \ --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 \ --no-acpi \ --boot c \ --usb \ --drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\ -cache=writethrough \ --device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ --drive file=/dev/HostVG/QEMUGuest2,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 diff --git a/tests/qemuxml2argvdata/disk-cache-v2-wt.xml b/tests/qemuxml2argvdata/disk-cache-v2-wt.xml deleted file mode 100644 index 082aecc133..0000000000 --- a/tests/qemuxml2argvdata/disk-cache-v2-wt.xml +++ /dev/null @@ -1,37 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - - - - - - - - diff --git a/tests/qemuxml2argvdata/disk-cache.args b/tests/qemuxml2argvdata/disk-cache.args index ee2f79a99f..1a692fc533 100644 --- a/tests/qemuxml2argvdata/disk-cache.args +++ b/tests/qemuxml2argvdata/disk-cache.args @@ -26,6 +26,9 @@ server,nowait \ -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\ cache=writeback \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ +-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-1,\ +cache=unsafe \ +-device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \ -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-scsi0-0-0,\ cache=none \ -device scsi-disk,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0 \ diff --git a/tests/qemuxml2argvdata/disk-cache.x86_64-2.6.0.args b/tests/qemuxml2argvdata/disk-cache.x86_64-2.6.0.args index 9af27dbbaf..1c75839c9e 100644 --- a/tests/qemuxml2argvdata/disk-cache.x86_64-2.6.0.args +++ b/tests/qemuxml2argvdata/disk-cache.x86_64-2.6.0.args @@ -29,6 +29,9 @@ server,nowait \ -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\ cache=writeback \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ +-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-1,\ +cache=unsafe \ +-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \ -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-scsi0-0-0,\ cache=none \ -device scsi-hd,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0 \ diff --git a/tests/qemuxml2argvdata/disk-cache.x86_64-2.7.0.args b/tests/qemuxml2argvdata/disk-cache.x86_64-2.7.0.args index 7b67f4369c..9f7d06e72c 100644 --- a/tests/qemuxml2argvdata/disk-cache.x86_64-2.7.0.args +++ b/tests/qemuxml2argvdata/disk-cache.x86_64-2.7.0.args @@ -30,6 +30,10 @@ server,nowait \ cache=writeback \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\ write-cache=on \ +-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-1,\ +cache=unsafe \ +-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\ +write-cache=on \ -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-scsi0-0-0,\ cache=none \ -device scsi-hd,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0,\ diff --git a/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args index 9e5b611351..9220e6bee9 100644 --- a/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args @@ -29,6 +29,10 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ cache=writeback \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\ write-cache=on \ +-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-1,\ +cache=unsafe \ +-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\ +write-cache=on \ -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-scsi0-0-0,\ cache=none \ -device scsi-hd,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0,\ diff --git a/tests/qemuxml2argvdata/disk-cache.xml b/tests/qemuxml2argvdata/disk-cache.xml index 6b762909b4..7e7d45459c 100644 --- a/tests/qemuxml2argvdata/disk-cache.xml +++ b/tests/qemuxml2argvdata/disk-cache.xml @@ -20,6 +20,12 @@
+ + + + +
+ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d3c2101abd..03430c2324 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1032,11 +1032,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DISK_SHARE_RW); DO_TEST("disk-error-policy", NONE); DO_TEST_CAPS_LATEST("disk-error-policy"); - DO_TEST("disk-cache-v2-wt", NONE); - DO_TEST("disk-cache-v2-wb", NONE); - DO_TEST("disk-cache-v2-none", NONE); - DO_TEST("disk-cache-directsync", NONE); - DO_TEST("disk-cache-unsafe", NONE); DO_TEST("disk-cache", QEMU_CAPS_SCSI_LSI, QEMU_CAPS_DEVICE_USB_STORAGE); DO_TEST_CAPS_VER("disk-cache", "2.6.0"); DO_TEST_CAPS_VER("disk-cache", "2.7.0"); diff --git a/tests/qemuxml2xmloutdata/disk-cache-directsync.xml b/tests/qemuxml2xmloutdata/disk-cache-directsync.xml deleted file mode 100644 index 2f9c64e440..0000000000 --- a/tests/qemuxml2xmloutdata/disk-cache-directsync.xml +++ /dev/null @@ -1,41 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - -
- - -
- - - - - - - diff --git a/tests/qemuxml2xmloutdata/disk-cache-unsafe.xml b/tests/qemuxml2xmloutdata/disk-cache-unsafe.xml deleted file mode 100644 index 2091402d8e..0000000000 --- a/tests/qemuxml2xmloutdata/disk-cache-unsafe.xml +++ /dev/null @@ -1,41 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - -
- - -
- - - - - - - diff --git a/tests/qemuxml2xmloutdata/disk-cache-v2-none.xml b/tests/qemuxml2xmloutdata/disk-cache-v2-none.xml deleted file mode 100644 index efc0f61136..0000000000 --- a/tests/qemuxml2xmloutdata/disk-cache-v2-none.xml +++ /dev/null @@ -1,41 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219100 - 219100 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - -
- - -
- - - - - - - diff --git a/tests/qemuxml2xmloutdata/disk-cache-v2-wb.xml b/tests/qemuxml2xmloutdata/disk-cache-v2-wb.xml deleted file mode 100644 index 1fded08c60..0000000000 --- a/tests/qemuxml2xmloutdata/disk-cache-v2-wb.xml +++ /dev/null @@ -1,41 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - -
- - -
- - - - - - - diff --git a/tests/qemuxml2xmloutdata/disk-cache-v2-wt.xml b/tests/qemuxml2xmloutdata/disk-cache-v2-wt.xml deleted file mode 100644 index 73c0e73a73..0000000000 --- a/tests/qemuxml2xmloutdata/disk-cache-v2-wt.xml +++ /dev/null @@ -1,41 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - -
- - -
- - - - - - - diff --git a/tests/qemuxml2xmloutdata/disk-cache.xml b/tests/qemuxml2xmloutdata/disk-cache.xml index 4c2a196ac0..cba4067f0d 100644 --- a/tests/qemuxml2xmloutdata/disk-cache.xml +++ b/tests/qemuxml2xmloutdata/disk-cache.xml @@ -20,6 +20,12 @@
+ + + + +
+ diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index a3480cd5d1..2ba55f3a92 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -357,11 +357,6 @@ mymain(void) DO_TEST("disk-boot-cdrom", NONE); DO_TEST("disk-error-policy", NONE); DO_TEST("disk-fmt-qcow", NONE); - DO_TEST("disk-cache-v2-wt", NONE); - DO_TEST("disk-cache-v2-wb", NONE); - DO_TEST("disk-cache-v2-none", NONE); - DO_TEST("disk-cache-directsync", NONE); - DO_TEST("disk-cache-unsafe", NONE); DO_TEST("disk-cache", QEMU_CAPS_SCSI_LSI); DO_TEST("disk-network-nbd", NONE); DO_TEST("disk-network-nbd-export", NONE);