[PATCH 2/2] tests: Add test for os interleaving

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

 



We don't usually do tests purely for one change, but one change was
special because when users will migrate to OVMF/AAVMF, commit 18f9f69b
makes their lives easier by allowing them to interleave <type/> inside
<os/>.  It would be nice of us to keep the possibility of them pasting
the loader and nvram elements wherever it is valid, hence this test.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 ...ml2argv-bios-nvram.xml => qemuxml2argv-bios-nvram-os-interleave.xml} | 2 +-
 .../qemuxml2xmlout-bios-nvram-os-interleave.xml}                        | 0
 tests/qemuxml2xmltest.c                                                 | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)
 copy tests/qemuxml2argvdata/{qemuxml2argv-bios-nvram.xml => qemuxml2argv-bios-nvram-os-interleave.xml} (100%)
 copy tests/{qemuxml2argvdata/qemuxml2argv-bios-nvram.xml => qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml} (100%)

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml b/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-os-interleave.xml
similarity index 100%
copy from tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml
copy to tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-os-interleave.xml
index d8270b1..0c3b925 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-os-interleave.xml
@@ -5,9 +5,9 @@
   <currentMemory unit='KiB'>1048576</currentMemory>
   <vcpu placement='static'>1</vcpu>
   <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
     <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
     <nvram>/usr/share/OVMF/OVMF_VARS.fd</nvram>
+    <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
     <bootmenu enable='yes'/>
   </os>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml
similarity index 100%
copy from tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml
copy to tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 271d6e1..2d81d2e 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -417,6 +417,7 @@ mymain(void)
     DO_TEST("numatune-memnode-no-memory");

     DO_TEST("bios-nvram");
+    DO_TEST_DIFFERENT("bios-nvram-os-interleave");

     DO_TEST("tap-vhost");
     DO_TEST_DIFFERENT("tap-vhost-incorrect");
-- 
2.3.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]