From 98ee8bcf6db09cbcaec7bf95a8ac84fac508ab35 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 9 Jul 2018 17:00:12 +0200 Subject: [PATCH] tests: qemuxml2argv: Unify all tests for disk error policy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add multiple drives with the various configurations rather than having multiple tests. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- .../disk-drive-error-policy-enospace.args | 30 -------------- .../disk-drive-error-policy-enospace.xml | 37 ----------------- .../disk-drive-error-policy-stop.args | 30 -------------- .../disk-drive-error-policy-stop.xml | 37 ----------------- ...nore.args => disk-drive-error-policy.args} | 9 ++-- ...ignore.xml => disk-drive-error-policy.xml} | 13 ++++-- tests/qemuxml2argvtest.c | 4 +- .../disk-drive-error-policy-enospace.xml | 41 ------------------- .../disk-drive-error-policy-stop.xml | 41 ------------------- ...ignore.xml => disk-drive-error-policy.xml} | 13 ++++-- tests/qemuxml2xmltest.c | 4 +- 11 files changed, 26 insertions(+), 233 deletions(-) delete mode 100644 tests/qemuxml2argvdata/disk-drive-error-policy-enospace.args delete mode 100644 tests/qemuxml2argvdata/disk-drive-error-policy-enospace.xml delete mode 100644 tests/qemuxml2argvdata/disk-drive-error-policy-stop.args delete mode 100644 tests/qemuxml2argvdata/disk-drive-error-policy-stop.xml rename tests/qemuxml2argvdata/{disk-drive-error-policy-wreport-rignore.args => disk-drive-error-policy.args} (73%) rename tests/qemuxml2argvdata/{disk-drive-error-policy-wreport-rignore.xml => disk-drive-error-policy.xml} (75%) delete mode 100644 tests/qemuxml2xmloutdata/disk-drive-error-policy-enospace.xml delete mode 100644 tests/qemuxml2xmloutdata/disk-drive-error-policy-stop.xml rename tests/qemuxml2xmloutdata/{disk-drive-error-policy-wreport-rignore.xml => disk-drive-error-policy.xml} (78%) diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy-enospace.args b/tests/qemuxml2argvdata/disk-drive-error-policy-enospace.args deleted file mode 100644 index 3b7f54c975..0000000000 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-enospace.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,\ -werror=enospc,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-drive-error-policy-enospace.xml b/tests/qemuxml2argvdata/disk-drive-error-policy-enospace.xml deleted file mode 100644 index dcde3fd2ed..0000000000 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-enospace.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-drive-error-policy-stop.args b/tests/qemuxml2argvdata/disk-drive-error-policy-stop.args deleted file mode 100644 index 28a9727c67..0000000000 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-stop.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,\ -werror=stop,rerror=stop,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-drive-error-policy-stop.xml b/tests/qemuxml2argvdata/disk-drive-error-policy-stop.xml deleted file mode 100644 index 004dc974cd..0000000000 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-stop.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-drive-error-policy-wreport-rignore.args b/tests/qemuxml2argvdata/disk-drive-error-policy.args similarity index 73% rename from tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore.args rename to tests/qemuxml2argvdata/disk-drive-error-policy.args index b570de2ed6..9d510015f6 100644 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore.args +++ b/tests/qemuxml2argvdata/disk-drive-error-policy.args @@ -23,8 +23,11 @@ server,nowait \ -boot c \ -usb \ -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\ -werror=report,rerror=ignore,cache=none \ +werror=stop,rerror=stop,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 \ +-drive file=/dev/HostVG/QEMUGuest2,format=qcow2,if=none,id=drive-ide0-0-1,\ +werror=enospc,cache=none \ +-device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \ +-drive file=/dev/HostVG/QEMUGuest3,format=qcow2,if=none,id=drive-ide0-1-0,\ +werror=report,rerror=ignore,cache=none \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore.xml b/tests/qemuxml2argvdata/disk-drive-error-policy.xml similarity index 75% rename from tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore.xml rename to tests/qemuxml2argvdata/disk-drive-error-policy.xml index 98d2be9f2e..708c13fc0e 100644 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore.xml +++ b/tests/qemuxml2argvdata/disk-drive-error-policy.xml @@ -15,16 +15,21 @@ /usr/bin/qemu-system-i686 - +
- - + + + +
+ + + + -
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 3be5af03aa..65b034a75c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1035,9 +1035,7 @@ mymain(void) DO_TEST_PARSE_ERROR("disk-drive-shared-qcow", NONE); DO_TEST("disk-drive-shared-locking", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DISK_SHARE_RW); - DO_TEST("disk-drive-error-policy-stop", NONE); - DO_TEST("disk-drive-error-policy-enospace", NONE); - DO_TEST("disk-drive-error-policy-wreport-rignore", NONE); + DO_TEST("disk-drive-error-policy", NONE); DO_TEST("disk-drive-cache-v2-wt", NONE); DO_TEST("disk-drive-cache-v2-wb", NONE); DO_TEST("disk-drive-cache-v2-none", NONE); diff --git a/tests/qemuxml2xmloutdata/disk-drive-error-policy-enospace.xml b/tests/qemuxml2xmloutdata/disk-drive-error-policy-enospace.xml deleted file mode 100644 index 6ec367c76e..0000000000 --- a/tests/qemuxml2xmloutdata/disk-drive-error-policy-enospace.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-drive-error-policy-stop.xml b/tests/qemuxml2xmloutdata/disk-drive-error-policy-stop.xml deleted file mode 100644 index 51bd87fa6c..0000000000 --- a/tests/qemuxml2xmloutdata/disk-drive-error-policy-stop.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-drive-error-policy-wreport-rignore.xml b/tests/qemuxml2xmloutdata/disk-drive-error-policy.xml similarity index 78% rename from tests/qemuxml2xmloutdata/disk-drive-error-policy-wreport-rignore.xml rename to tests/qemuxml2xmloutdata/disk-drive-error-policy.xml index e4a21f4f11..0e534a1add 100644 --- a/tests/qemuxml2xmloutdata/disk-drive-error-policy-wreport-rignore.xml +++ b/tests/qemuxml2xmloutdata/disk-drive-error-policy.xml @@ -15,16 +15,21 @@ /usr/bin/qemu-system-i686 - +
- - + + + +
+ + + + -
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index bbb995656e..c0b228515c 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -356,9 +356,7 @@ mymain(void) DO_TEST("disk-virtio-drive-queues", QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES); DO_TEST("disk-drive-boot-disk", NONE); DO_TEST("disk-drive-boot-cdrom", NONE); - DO_TEST("disk-drive-error-policy-stop", NONE); - DO_TEST("disk-drive-error-policy-enospace", NONE); - DO_TEST("disk-drive-error-policy-wreport-rignore", NONE); + DO_TEST("disk-drive-error-policy", NONE); DO_TEST("disk-drive-fmt-qcow", NONE); DO_TEST("disk-drive-copy-on-read", NONE); DO_TEST("disk-drive-cache-v2-wt", NONE); -- GitLab