[PATCH 4/5] qemuxml2xmltest: Modernize rest of 'seclabel-*' tests

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

 



Use real capabilities for these last few tests that were not modernized
due to use of 'WHEN_INACTIVE'.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 ...el-dynamic-baselabel-inactive.x86_64-latest.xml} |  5 ++++-
 ...el-dynamic-labelskip-inactive.x86_64-latest.xml} |  5 ++++-
 ...dynamic-none-relabel-inactive.x86_64-latest.xml} |  5 ++++-
 ...bel-dynamic-override-inactive.x86_64-latest.xml} |  5 ++++-
 ...abel-dynamic-relabel-inactive.x86_64-latest.xml} |  5 ++++-
 tests/qemuxml2xmltest.c                             | 13 +++++--------
 6 files changed, 25 insertions(+), 13 deletions(-)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-baselabel-inactive.xml => seclabel-dynamic-baselabel-inactive.x86_64-latest.xml} (90%)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-labelskip-inactive.xml => seclabel-dynamic-labelskip-inactive.x86_64-latest.xml} (90%)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-none-relabel-inactive.xml => seclabel-dynamic-none-relabel-inactive.x86_64-latest.xml} (92%)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-override-inactive.xml => seclabel-dynamic-override-inactive.x86_64-latest.xml} (92%)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-relabel-inactive.xml => seclabel-dynamic-relabel-inactive.x86_64-latest.xml} (89%)

diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.x86_64-latest.xml
similarity index 90%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.x86_64-latest.xml
index 5fa8455f77..7ab0558e66 100644
--- a/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.xml
+++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.x86_64-latest.xml
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -20,7 +23,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.x86_64-latest.xml
similarity index 90%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.x86_64-latest.xml
index 5fa8455f77..7ab0558e66 100644
--- a/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.xml
+++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.x86_64-latest.xml
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -20,7 +23,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.x86_64-latest.xml
similarity index 92%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.x86_64-latest.xml
index 09c019e474..005e13334c 100644
--- a/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.xml
+++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.x86_64-latest.xml
@@ -16,13 +16,16 @@
   <features>
     <acpi/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='virtio-serial' index='0'>
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.x86_64-latest.xml
similarity index 92%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.x86_64-latest.xml
index 56f15db911..7c1d16d0b2 100644
--- a/tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.xml
+++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.x86_64-latest.xml
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -32,7 +35,7 @@
       <target dev='hdb' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.x86_64-latest.xml
similarity index 89%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.x86_64-latest.xml
index a2b4a3e19e..d94c33d47b 100644
--- a/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.xml
+++ b/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.x86_64-latest.xml
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -20,7 +23,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index e6018f8240..f6be677694 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -503,20 +503,17 @@ mymain(void)
     DO_TEST_CAPS_ARCH_LATEST("ppc64-tpmproxy-single", "ppc64");
     DO_TEST_CAPS_ARCH_LATEST("ppc64-tpmproxy-with-tpm", "ppc64");

-    DO_TEST_FULL("seclabel-dynamic-baselabel", "", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END);
-    DO_TEST_FULL("seclabel-dynamic-override", "", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END);
-    DO_TEST_FULL("seclabel-dynamic-labelskip", "", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END);
-    DO_TEST_FULL("seclabel-dynamic-relabel", "", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-baselabel", "x86_64", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-override", "x86_64", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-labelskip", "x86_64", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-relabel", "x86_64", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END);
     DO_TEST_CAPS_LATEST("seclabel-static");
     DO_TEST_CAPS_LATEST("seclabel-static-labelskip");
     DO_TEST_CAPS_LATEST("seclabel-none");
     DO_TEST_CAPS_LATEST("seclabel-dac-none");
     DO_TEST_CAPS_LATEST("seclabel-dynamic-none");
     DO_TEST_CAPS_LATEST("seclabel-device-multiple");
-    DO_TEST_FULL("seclabel-dynamic-none-relabel", "", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE,
-                 ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_CIRRUS_VGA,
-                 QEMU_CAPS_SPICE, QEMU_CAPS_LAST,
-                 ARG_END);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("seclabel-dynamic-none-relabel", "x86_64", ARG_FLAGS, FLAG_SKIP_CONFIG_ACTIVE, ARG_END);
     DO_TEST_CAPS_LATEST("numad-static-vcpu-no-numatune");

     DO_TEST_CAPS_LATEST("disk-scsi-disk-vpd");
-- 
2.41.0




[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