[PATCH 19/21] qemuxml2argvtest: Convert 'missing-machine' to DO_TEST_CAPS_LATEST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Emulator binary change is needed to use the latest caps properly. The
comment is no longer needed, the expected error is recorded in the 'err'
file.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/qemuxml2argvdata/missing-machine.err            |  1 -
 .../missing-machine.x86_64-latest.err                 |  1 +
 tests/qemuxml2argvdata/missing-machine.xml            |  2 +-
 tests/qemuxml2argvtest.c                              | 11 +----------
 4 files changed, 3 insertions(+), 12 deletions(-)
 delete mode 100644 tests/qemuxml2argvdata/missing-machine.err
 create mode 100644 tests/qemuxml2argvdata/missing-machine.x86_64-latest.err

diff --git a/tests/qemuxml2argvdata/missing-machine.err b/tests/qemuxml2argvdata/missing-machine.err
deleted file mode 100644
index e13b3c5145..0000000000
--- a/tests/qemuxml2argvdata/missing-machine.err
+++ /dev/null
@@ -1 +0,0 @@
-unsupported configuration: Emulator '/usr/bin/qemu-system-i386' does not support arch 'alpha'
diff --git a/tests/qemuxml2argvdata/missing-machine.x86_64-latest.err b/tests/qemuxml2argvdata/missing-machine.x86_64-latest.err
new file mode 100644
index 0000000000..ba2e160f50
--- /dev/null
+++ b/tests/qemuxml2argvdata/missing-machine.x86_64-latest.err
@@ -0,0 +1 @@
+unsupported configuration: Emulator '/usr/bin/qemu-system-x86_64' does not support arch 'alpha'
diff --git a/tests/qemuxml2argvdata/missing-machine.xml b/tests/qemuxml2argvdata/missing-machine.xml
index 30735b503a..d9935d3338 100644
--- a/tests/qemuxml2argvdata/missing-machine.xml
+++ b/tests/qemuxml2argvdata/missing-machine.xml
@@ -14,7 +14,7 @@
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
-    <emulator>/usr/bin/qemu-system-i386</emulator>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <disk type='block' device='disk'>
       <source dev='/dev/HostVG/QEMUGuest1'/>
       <target dev='hda' bus='ide'/>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a6165f6760..cd02a5a7d7 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -3272,16 +3272,7 @@ mymain(void)
     DO_TEST("sparc-minimal",
             QEMU_CAPS_SCSI_NCR53C90);

-    /* VM XML has invalid arch/ostype/virttype combo, but the SKIP flag
-     * will avoid the error during parse. This will cause us to fill in
-     * the missing machine type using the i386 binary, despite it being
-     * the wrong binary for the arch. We expect to get a failure about
-     * bad arch later when creating the pretend command.
-     */
-    DO_TEST_FULL("missing-machine", "",
-                 ARG_FLAGS, FLAG_EXPECT_FAILURE,
-                 ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE,
-                 ARG_END);
+    DO_TEST_CAPS_LATEST_PARSE_ERROR("missing-machine");

     DO_TEST_CAPS_VER("name-escape", "2.11.0");
     DO_TEST_CAPS_LATEST("name-escape");
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux