]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virstoragetest: testBackingParse: Use VIR_DOMAIN_DEF_FORMAT_SECURE when formatting xml
authorPeter Krempa <pkrempa@redhat.com>
Tue, 14 Apr 2020 08:26:24 +0000 (10:26 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 14 Apr 2020 16:47:01 +0000 (18:47 +0200)
We want to format even the secure information in tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
tests/virstoragetest.c

index 6e8ebeba134b8b6ede2bf7be5682ec27204aa6c1..6d2b21c25f349b217f214c8843df00f6d45032f5 100644 (file)
@@ -594,6 +594,7 @@ testBackingParse(const void *args)
     g_autoptr(virStorageSource) src = NULL;
     int rc;
     int erc = data->rv;
+    unsigned int xmlformatflags = VIR_DOMAIN_DEF_FORMAT_SECURE;
 
     /* expect failure return code with NULL expected data */
     if (!data->expect)
@@ -613,7 +614,7 @@ testBackingParse(const void *args)
         return -1;
     }
 
-    if (virDomainDiskSourceFormat(&buf, src, "source", 0, false, 0, true, NULL) < 0 ||
+    if (virDomainDiskSourceFormat(&buf, src, "source", 0, false, xmlformatflags, true, NULL) < 0 ||
         !(xml = virBufferContentAndReset(&buf))) {
         fprintf(stderr, "failed to format disk source xml\n");
         return -1;