From: Andrea Bolognani Date: Thu, 13 Sep 2018 16:28:59 +0000 (+0200) Subject: tests: Add more tests to qemucaps2xml X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a3676f3763625d06778ee14dd6b006b3ba91846a;p=libvirt.git tests: Add more tests to qemucaps2xml More specifically, everything that's tested by qemucapabilities now goes through qemucaps2xml as well. Ideally we'll rewrite both so that listing all test cases is unnecessary and they get picked up automatically by listing the contents of the input directory instead, but that's a refactor for another day :) Signed-off-by: Andrea Bolognani Reviewed-by: Jiri Denemark --- diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index e53023b3b9..498876e383 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -163,6 +163,7 @@ mymain(void) ret = -1; \ } while (0) + /* Keep this in sync with qemucaps2xmltest */ DO_TEST("x86_64", "caps_1.5.3"); DO_TEST("x86_64", "caps_1.6.0"); DO_TEST("x86_64", "caps_1.7.0"); diff --git a/tests/qemucaps2xmloutdata/caps_1.5.3.x86_64.xml b/tests/qemucaps2xmloutdata/caps_1.5.3.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_1.5.3.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_1.7.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_1.7.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_1.7.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.1.1.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.1.1.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.1.1.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.10.0.aarch64.xml b/tests/qemucaps2xmloutdata/caps_2.10.0.aarch64.xml new file mode 100644 index 0000000000..a879d67df3 --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.10.0.aarch64.xml @@ -0,0 +1,29 @@ + + + + + aarch64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-aarch64 + + + /usr/bin/qemu-system-aarch64 + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.10.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_2.10.0.ppc64.xml new file mode 100644 index 0000000000..74eaf3ba0e --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.10.0.ppc64.xml @@ -0,0 +1,28 @@ + + + + + ppc64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-ppc64 + + + /usr/bin/qemu-system-ppc64 + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.10.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.10.0.s390x.xml new file mode 100644 index 0000000000..20ef995d62 --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.10.0.s390x.xml @@ -0,0 +1,28 @@ + + + + + s390x + + + + + + + hvm + + 64 + /usr/bin/qemu-system-s390x + + + /usr/bin/qemu-system-s390x + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.10.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.10.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.10.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.11.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.11.0.s390x.xml new file mode 100644 index 0000000000..20ef995d62 --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.11.0.s390x.xml @@ -0,0 +1,28 @@ + + + + + s390x + + + + + + + hvm + + 64 + /usr/bin/qemu-system-s390x + + + /usr/bin/qemu-system-s390x + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.11.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.11.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.11.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.12.0.aarch64.xml b/tests/qemucaps2xmloutdata/caps_2.12.0.aarch64.xml new file mode 100644 index 0000000000..a879d67df3 --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.12.0.aarch64.xml @@ -0,0 +1,29 @@ + + + + + aarch64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-aarch64 + + + /usr/bin/qemu-system-aarch64 + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.12.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_2.12.0.ppc64.xml new file mode 100644 index 0000000000..74eaf3ba0e --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.12.0.ppc64.xml @@ -0,0 +1,28 @@ + + + + + ppc64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-ppc64 + + + /usr/bin/qemu-system-ppc64 + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.12.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.12.0.s390x.xml new file mode 100644 index 0000000000..20ef995d62 --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.12.0.s390x.xml @@ -0,0 +1,28 @@ + + + + + s390x + + + + + + + hvm + + 64 + /usr/bin/qemu-system-s390x + + + /usr/bin/qemu-system-s390x + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.12.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.12.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.12.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.4.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.4.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.4.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.5.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.5.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.5.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.6.0.aarch64.xml b/tests/qemucaps2xmloutdata/caps_2.6.0.aarch64.xml new file mode 100644 index 0000000000..a879d67df3 --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.6.0.aarch64.xml @@ -0,0 +1,29 @@ + + + + + aarch64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-aarch64 + + + /usr/bin/qemu-system-aarch64 + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.6.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_2.6.0.ppc64.xml new file mode 100644 index 0000000000..74eaf3ba0e --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.6.0.ppc64.xml @@ -0,0 +1,28 @@ + + + + + ppc64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-ppc64 + + + /usr/bin/qemu-system-ppc64 + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.6.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.6.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.6.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.7.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.7.0.s390x.xml new file mode 100644 index 0000000000..20ef995d62 --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.7.0.s390x.xml @@ -0,0 +1,28 @@ + + + + + s390x + + + + + + + hvm + + 64 + /usr/bin/qemu-system-s390x + + + /usr/bin/qemu-system-s390x + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.7.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.7.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.7.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.8.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.8.0.s390x.xml new file mode 100644 index 0000000000..20ef995d62 --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.8.0.s390x.xml @@ -0,0 +1,28 @@ + + + + + s390x + + + + + + + hvm + + 64 + /usr/bin/qemu-system-s390x + + + /usr/bin/qemu-system-s390x + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.8.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.8.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.8.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.9.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_2.9.0.ppc64.xml new file mode 100644 index 0000000000..74eaf3ba0e --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.9.0.ppc64.xml @@ -0,0 +1,28 @@ + + + + + ppc64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-ppc64 + + + /usr/bin/qemu-system-ppc64 + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.9.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.9.0.s390x.xml new file mode 100644 index 0000000000..20ef995d62 --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.9.0.s390x.xml @@ -0,0 +1,28 @@ + + + + + s390x + + + + + + + hvm + + 64 + /usr/bin/qemu-system-s390x + + + /usr/bin/qemu-system-s390x + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_2.9.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.9.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_2.9.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_3.0.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_3.0.0.ppc64.xml new file mode 100644 index 0000000000..74eaf3ba0e --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_3.0.0.ppc64.xml @@ -0,0 +1,28 @@ + + + + + ppc64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-ppc64 + + + /usr/bin/qemu-system-ppc64 + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_3.0.0.riscv32.xml b/tests/qemucaps2xmloutdata/caps_3.0.0.riscv32.xml new file mode 100644 index 0000000000..63c374da7f --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_3.0.0.riscv32.xml @@ -0,0 +1,25 @@ + + + + + riscv32 + + + + + + + hvm + + 32 + /usr/bin/qemu-system-riscv32 + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_3.0.0.riscv64.xml b/tests/qemucaps2xmloutdata/caps_3.0.0.riscv64.xml new file mode 100644 index 0000000000..09b7eb7f2f --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_3.0.0.riscv64.xml @@ -0,0 +1,25 @@ + + + + + riscv64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-riscv64 + + + + + + + + + + diff --git a/tests/qemucaps2xmloutdata/caps_3.0.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_3.0.0.x86_64.xml new file mode 100644 index 0000000000..b58f54fefd --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_3.0.0.x86_64.xml @@ -0,0 +1,30 @@ + + + + + x86_64 + + + + + + + hvm + + 64 + /usr/bin/qemu-system-x86_64 + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c index 65dd97c0a4..e765a03b73 100644 --- a/tests/qemucaps2xmltest.c +++ b/tests/qemucaps2xmltest.c @@ -187,7 +187,37 @@ mymain(void) if (virTestRun(name "(" arch ")", testQemuCapsXML, &data) < 0) \ ret = -1 + /* Keep this in sync with qemucapabilitiestest */ + DO_TEST("x86_64", "caps_1.5.3"); DO_TEST("x86_64", "caps_1.6.0"); + DO_TEST("x86_64", "caps_1.7.0"); + DO_TEST("x86_64", "caps_2.1.1"); + DO_TEST("x86_64", "caps_2.4.0"); + DO_TEST("x86_64", "caps_2.5.0"); + DO_TEST("x86_64", "caps_2.6.0"); + DO_TEST("x86_64", "caps_2.7.0"); + DO_TEST("x86_64", "caps_2.8.0"); + DO_TEST("x86_64", "caps_2.9.0"); + DO_TEST("x86_64", "caps_2.10.0"); + DO_TEST("x86_64", "caps_2.11.0"); + DO_TEST("x86_64", "caps_2.12.0"); + DO_TEST("x86_64", "caps_3.0.0"); + DO_TEST("aarch64", "caps_2.6.0"); + DO_TEST("aarch64", "caps_2.10.0"); + DO_TEST("aarch64", "caps_2.12.0"); + DO_TEST("ppc64", "caps_2.6.0"); + DO_TEST("ppc64", "caps_2.9.0"); + DO_TEST("ppc64", "caps_2.10.0"); + DO_TEST("ppc64", "caps_2.12.0"); + DO_TEST("ppc64", "caps_3.0.0"); + DO_TEST("s390x", "caps_2.7.0"); + DO_TEST("s390x", "caps_2.8.0"); + DO_TEST("s390x", "caps_2.9.0"); + DO_TEST("s390x", "caps_2.10.0"); + DO_TEST("s390x", "caps_2.11.0"); + DO_TEST("s390x", "caps_2.12.0"); + DO_TEST("riscv32", "caps_3.0.0"); + DO_TEST("riscv64", "caps_3.0.0"); return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }