Blame SOURCES/libvirt-tests-domainsnapshotxml2xml-make-disk-seclabel-test-operational.patch

99cbc7
From d2b1f0101b75663b8ae31adfb008bdf0b111e873 Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <d2b1f0101b75663b8ae31adfb008bdf0b111e873@dist-git>
99cbc7
From: Peter Krempa <pkrempa@redhat.com>
99cbc7
Date: Thu, 20 Jun 2019 17:45:03 +0200
99cbc7
Subject: [PATCH] tests: domainsnapshotxml2xml: make 'disk-seclabel' test
99cbc7
 operational
99cbc7
99cbc7
Now that we added the seclabels to the schema we can test that they are
99cbc7
parsed and formatted correctly.
99cbc7
99cbc7
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
99cbc7
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
99cbc7
(cherry picked from commit 3203681e5e8513425acdf3f25d0981f5157f0ddf)
99cbc7
99cbc7
 Conflicts:
99cbc7
tests/domainsnapshotxml2xmltest.c:
99cbc7
  - refactors to the testsuite (a10c6b300e9, 0ea43b55a40, ...) were not
99cbc7
    backported. Test invocation needed to be changed.
99cbc7
99cbc7
https: //bugzilla.redhat.com/show_bug.cgi?id=1584682
99cbc7
Message-Id: <9e8368c18a7b3746dcc750953170771f49453afc.1561045343.git.pkrempa@redhat.com>
99cbc7
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
99cbc7
---
99cbc7
 tests/domainsnapshotxml2xmlout/disk-seclabel.xml | 15 +++++++++++++++
99cbc7
 tests/domainsnapshotxml2xmltest.c                |  1 +
99cbc7
 2 files changed, 16 insertions(+)
99cbc7
 create mode 100644 tests/domainsnapshotxml2xmlout/disk-seclabel.xml
99cbc7
99cbc7
diff --git a/tests/domainsnapshotxml2xmlout/disk-seclabel.xml b/tests/domainsnapshotxml2xmlout/disk-seclabel.xml
99cbc7
new file mode 100644
99cbc7
index 0000000000..989cfc4964
99cbc7
--- /dev/null
99cbc7
+++ b/tests/domainsnapshotxml2xmlout/disk-seclabel.xml
99cbc7
@@ -0,0 +1,15 @@
99cbc7
+<domainsnapshot>
99cbc7
+  <name>my snap name</name>
99cbc7
+  <description>!@#$%^</description>
99cbc7
+  <creationTime>581484660</creationTime>
99cbc7
+  <disks>
99cbc7
+    <disk name='hde' snapshot='external' type='file'>
99cbc7
+      <source file='/path/to/new2'>
99cbc7
+        <seclabel model='dac' relabel='no'/>
99cbc7
+      </source>
99cbc7
+    </disk>
99cbc7
+  </disks>
99cbc7
+  <domain>
99cbc7
+    <uuid>9d37b878-a7cc-9f9a-b78f-49b3abad25a8</uuid>
99cbc7
+  </domain>
99cbc7
+</domainsnapshot>
99cbc7
diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xmltest.c
99cbc7
index 5ea0f325de..2b594e626c 100644
99cbc7
--- a/tests/domainsnapshotxml2xmltest.c
99cbc7
+++ b/tests/domainsnapshotxml2xmltest.c
99cbc7
@@ -214,6 +214,7 @@ mymain(void)
99cbc7
     DO_TEST_INOUT("noparent", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false);
99cbc7
     DO_TEST_INOUT("disk_snapshot", NULL, false, false);
99cbc7
     DO_TEST_INOUT("disk_driver_name_null", NULL, false, false);
99cbc7
+    DO_TEST_INOUT("disk-seclabel", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false);
99cbc7
 
99cbc7
     DO_TEST_IN("name_and_description", NULL);
99cbc7
     DO_TEST_IN("description_only", NULL);
99cbc7
-- 
99cbc7
2.22.1
99cbc7