From: Andrea Bolognani Date: Thu, 28 Feb 2019 16:10:17 +0000 (+0100) Subject: tests: Use WHEN_BOTH in qemuxml2xml whenever possible X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bb5c6e7a968ff3ce88b50f02522ace8eba664343;p=libvirt.git tests: Use WHEN_BOTH in qemuxml2xml whenever possible There are a few cases where we are using either WHEN_ACTIVE or WHEN_INACTIVE even though WHEN_BOTH would work perfectly fine: for those, start using the simpler DO_TEST() macro. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- diff --git a/tests/qemuxml2xmloutdata/channel-unix-source-path-active.xml b/tests/qemuxml2xmloutdata/channel-unix-source-path-active.xml new file mode 100644 index 0000000000..4c2a02b49a --- /dev/null +++ b/tests/qemuxml2xmloutdata/channel-unix-source-path-active.xml @@ -0,0 +1,48 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + diff --git a/tests/qemuxml2xmloutdata/channel-unix-source-path-inactive.xml b/tests/qemuxml2xmloutdata/channel-unix-source-path-inactive.xml new file mode 100644 index 0000000000..2d8fa1e3ac --- /dev/null +++ b/tests/qemuxml2xmloutdata/channel-unix-source-path-inactive.xml @@ -0,0 +1,45 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + + +
+ + + + + + diff --git a/tests/qemuxml2xmloutdata/channel-unix-source-path.xml b/tests/qemuxml2xmloutdata/channel-unix-source-path.xml deleted file mode 100644 index 2d8fa1e3ac..0000000000 --- a/tests/qemuxml2xmloutdata/channel-unix-source-path.xml +++ /dev/null @@ -1,45 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219100 - 219100 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-x86_64 - -
- - - -
- - - -
- - - -
- - - -
- - - - -
- - - - - - diff --git a/tests/qemuxml2xmloutdata/disk-active-commit-active.xml b/tests/qemuxml2xmloutdata/disk-active-commit-active.xml new file mode 100644 index 0000000000..cc26af1096 --- /dev/null +++ b/tests/qemuxml2xmloutdata/disk-active-commit-active.xml @@ -0,0 +1,45 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + + + + + + + + + +
+ + +
+ + +
+ + + + + +
+ + + diff --git a/tests/qemuxml2xmloutdata/disk-active-commit-inactive.xml b/tests/qemuxml2xmloutdata/disk-active-commit-inactive.xml new file mode 100644 index 0000000000..b14345049d --- /dev/null +++ b/tests/qemuxml2xmloutdata/disk-active-commit-inactive.xml @@ -0,0 +1,41 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + + + + + +
+ + +
+ + +
+ + + + + +
+ + + diff --git a/tests/qemuxml2xmloutdata/disk-active-commit.xml b/tests/qemuxml2xmloutdata/disk-active-commit.xml deleted file mode 100644 index cc26af1096..0000000000 --- a/tests/qemuxml2xmloutdata/disk-active-commit.xml +++ /dev/null @@ -1,45 +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/seclabel-static-labelskip-active.xml b/tests/qemuxml2xmloutdata/seclabel-static-labelskip-active.xml new file mode 100644 index 0000000000..7c448675e2 --- /dev/null +++ b/tests/qemuxml2xmloutdata/seclabel-static-labelskip-active.xml @@ -0,0 +1,43 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + + + +
+ + +
+ + +
+ + + + + +
+ + + + + system_u:system_r:svirt_custom_t:s0:c192,c392 + + diff --git a/tests/qemuxml2xmloutdata/seclabel-static-labelskip-inactive.xml b/tests/qemuxml2xmloutdata/seclabel-static-labelskip-inactive.xml new file mode 100644 index 0000000000..e705b5452c --- /dev/null +++ b/tests/qemuxml2xmloutdata/seclabel-static-labelskip-inactive.xml @@ -0,0 +1,40 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + +
+ + +
+ + +
+ + + + + +
+ + + + + + diff --git a/tests/qemuxml2xmloutdata/seclabel-static-labelskip.xml b/tests/qemuxml2xmloutdata/seclabel-static-labelskip.xml deleted file mode 100644 index 7c448675e2..0000000000 --- a/tests/qemuxml2xmloutdata/seclabel-static-labelskip.xml +++ /dev/null @@ -1,43 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219100 - 219100 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - - - - -
- - -
- - -
- - - - - -
- - - - - system_u:system_r:svirt_custom_t:s0:c192,c392 - - diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index fc76bac08e..e08d30c676 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -375,7 +375,7 @@ mymain(void) QEMU_CAPS_CCW); DO_TEST("disk-mirror-old", NONE); DO_TEST("disk-mirror", NONE); - DO_TEST_FULL("disk-active-commit", WHEN_ACTIVE, GIC_NONE, NONE); + DO_TEST("disk-active-commit", NONE); DO_TEST("graphics-listen-network", NONE); DO_TEST("graphics-vnc", NONE); DO_TEST("graphics-vnc-websocket", NONE); @@ -451,7 +451,7 @@ mymain(void) DO_TEST("channel-virtio", NONE); DO_TEST("channel-virtio-state", NONE); - DO_TEST_FULL("channel-unix-source-path", WHEN_INACTIVE, GIC_NONE, NONE); + DO_TEST("channel-unix-source-path", NONE); DO_TEST("hostdev-usb-address", NONE); DO_TEST("hostdev-pci-address", NONE); @@ -549,7 +549,7 @@ mymain(void) DO_TEST_FULL("seclabel-dynamic-labelskip", WHEN_INACTIVE, GIC_NONE, NONE); DO_TEST_FULL("seclabel-dynamic-relabel", WHEN_INACTIVE, GIC_NONE, NONE); DO_TEST("seclabel-static", NONE); - DO_TEST_FULL("seclabel-static-labelskip", WHEN_ACTIVE, GIC_NONE, NONE); + DO_TEST("seclabel-static-labelskip", NONE); DO_TEST("seclabel-none", NONE); DO_TEST("seclabel-dac-none", NONE); DO_TEST("seclabel-dynamic-none", NONE);