]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: domainsnapshotxml2xml: make 'disk-seclabel' test operational
authorPeter Krempa <pkrempa@redhat.com>
Tue, 5 Jun 2018 14:02:11 +0000 (16:02 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 20 Jun 2019 15:08:53 +0000 (17:08 +0200)
Now that we added the seclabels to the schema we can test that they are
parsed and formatted correctly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
tests/domainsnapshotxml2xmlout/disk-seclabel.xml [new file with mode: 0644]
tests/domainsnapshotxml2xmltest.c

diff --git a/tests/domainsnapshotxml2xmlout/disk-seclabel.xml b/tests/domainsnapshotxml2xmlout/disk-seclabel.xml
new file mode 100644 (file)
index 0000000..989cfc4
--- /dev/null
@@ -0,0 +1,15 @@
+<domainsnapshot>
+  <name>my snap name</name>
+  <description>!@#$%^</description>
+  <creationTime>581484660</creationTime>
+  <disks>
+    <disk name='hde' snapshot='external' type='file'>
+      <source file='/path/to/new2'>
+        <seclabel model='dac' relabel='no'/>
+      </source>
+    </disk>
+  </disks>
+  <domain>
+    <uuid>9d37b878-a7cc-9f9a-b78f-49b3abad25a8</uuid>
+  </domain>
+</domainsnapshot>
index c2c7bedb56dea8972a5c54898cc42d5fbed9a034..c34ab0bc89e3ac8eaf2eba94d34ac816e7c5d1e6 100644 (file)
@@ -183,6 +183,7 @@ mymain(void)
     DO_TEST_INOUT("external_vm", NULL, 1555419243, 0);
     DO_TEST_INOUT("disk_snapshot", NULL, 1555419243, 0);
     DO_TEST_INOUT("disk_driver_name_null", NULL, 1555419243, 0);
+    DO_TEST_INOUT("disk-seclabel", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", 581484660, 0);
 
     DO_TEST_IN("name_and_description", NULL);
     DO_TEST_IN("description_only", NULL);