diff mbox series

[v2,01/16] tests: domcaps: Add a default 'empty' test

Message ID 135b87f1280c46b2b0fbd930fa8c5fbeb00bbdb1.1551914794.git.crobinso@redhat.com
State New
Headers show
Series domcaps: use virTristateBool | expand

Commit Message

Cole Robinson March 6, 2019, 11:36 p.m. UTC
The 'empty' demonstrates XML generated when only bare minimum caps
data has been filled in. This will demonstrate changes that alter
the default XML output.

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 tests/domaincapsschemadata/empty.xml | 25 +++++++++++++++++++++++++
 tests/domaincapstest.c               |  3 +++
 2 files changed, 28 insertions(+)
 create mode 100644 tests/domaincapsschemadata/empty.xml

-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox series

Patch

diff --git a/tests/domaincapsschemadata/empty.xml b/tests/domaincapsschemadata/empty.xml
new file mode 100644
index 0000000000..2b2e97d3b3
--- /dev/null
+++ b/tests/domaincapsschemadata/empty.xml
@@ -0,0 +1,25 @@ 
+<domainCapabilities>
+  <path>/bin/emulatorbin</path>
+  <domain>kvm</domain>
+  <machine>my-machine-type</machine>
+  <arch>x86_64</arch>
+  <iothreads supported='no'/>
+  <os supported='no'/>
+  <cpu>
+    <mode name='host-passthrough' supported='no'/>
+    <mode name='host-model' supported='no'/>
+    <mode name='custom' supported='no'/>
+  </cpu>
+  <devices>
+    <disk supported='no'/>
+    <graphics supported='no'/>
+    <video supported='no'/>
+    <hostdev supported='no'/>
+  </devices>
+  <features>
+    <gic supported='no'/>
+    <vmcoreinfo supported='no'/>
+    <genid supported='no'/>
+    <sev supported='no'/>
+  </features>
+</domainCapabilities>
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index 3be2806a48..b5bf4c234f 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -433,6 +433,9 @@  mymain(void)
         VIR_FREE(name); \
     } while (0)
 
+    DO_TEST("empty", "/bin/emulatorbin", "my-machine-type",
+            "x86_64", VIR_DOMAIN_VIRT_KVM, CAPS_NONE);
+
 #if WITH_QEMU
 
     DO_TEST_QEMU("1.7.0", "caps_1.7.0",