diff mbox series

tests: cover disk, interface <backenddomain>

Message ID f818de43e51dd57e81faccd4f7bd64d83217dac9.1601838327.git.crobinso@redhat.com
State New
Headers show
Series tests: cover disk, interface <backenddomain> | expand

Commit Message

Cole Robinson Oct. 4, 2020, 7:05 p.m. UTC
There is present no XML test coverage for this.
Add genericxml parse + formatting coverage.

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

---
 .../device-backenddomain.xml                  | 30 +++++++++++++++++++
 .../device-backenddomain.xml                  |  1 +
 tests/genericxml2xmltest.c                    |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 tests/genericxml2xmlindata/device-backenddomain.xml
 create mode 120000 tests/genericxml2xmloutdata/device-backenddomain.xml

-- 
2.28.0

Comments

Michal Prívozník Oct. 5, 2020, 3:58 p.m. UTC | #1
On 10/4/20 9:05 PM, Cole Robinson wrote:
> There is present no XML test coverage for this.

> Add genericxml parse + formatting coverage.

> 

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

> ---

>   .../device-backenddomain.xml                  | 30 +++++++++++++++++++

>   .../device-backenddomain.xml                  |  1 +

>   tests/genericxml2xmltest.c                    |  1 +

>   3 files changed, 32 insertions(+)

>   create mode 100644 tests/genericxml2xmlindata/device-backenddomain.xml

>   create mode 120000 tests/genericxml2xmloutdata/device-backenddomain.xml


Reviewed-by: Michal Privoznik <mprivozn@redhat.com>


Michal
diff mbox series

Patch

diff --git a/tests/genericxml2xmlindata/device-backenddomain.xml b/tests/genericxml2xmlindata/device-backenddomain.xml
new file mode 100644
index 0000000000..8e89c7fec3
--- /dev/null
+++ b/tests/genericxml2xmlindata/device-backenddomain.xml
@@ -0,0 +1,30 @@ 
+<domain type='qemu'>
+  <name>foo</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <backenddomain name='bar'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='ide' index='0'/>
+    <interface type='bridge'>
+      <mac address='aa:bb:cc:dd:ee:ff'/>
+      <source bridge='br0'/>
+      <backenddomain name='foo'/>
+    </interface>
+  </devices>
+</domain>
diff --git a/tests/genericxml2xmloutdata/device-backenddomain.xml b/tests/genericxml2xmloutdata/device-backenddomain.xml
new file mode 120000
index 0000000000..f19471e3b5
--- /dev/null
+++ b/tests/genericxml2xmloutdata/device-backenddomain.xml
@@ -0,0 +1 @@ 
+../genericxml2xmlindata/device-backenddomain.xml
\ No newline at end of file
diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c
index 102abfdec2..5110bfba86 100644
--- a/tests/genericxml2xmltest.c
+++ b/tests/genericxml2xmltest.c
@@ -233,6 +233,7 @@  mymain(void)
     DO_TEST("launch-security-sev");
 
     DO_TEST_DIFFERENT("cputune");
+    DO_TEST("device-backenddomain");
 
 #define DO_TEST_BACKUP_FULL(name, intrnl) \
     do { \