[PATCH 11/24] virstoragetest: Use preformatted file for testing missing backing store

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Similarly to previous ones, this one doesn't need to be created by
qemu-img in order for the test to make sense.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/virstoragetest.c                         |  12 +++---------
 .../images/qcow2_qcow2-missing.qcow2           | Bin 0 -> 196616 bytes
 2 files changed, 3 insertions(+), 9 deletions(-)
 create mode 100644 tests/virstoragetestdata/images/qcow2_qcow2-missing.qcow2

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 8d3dde265f..34aff3e6dd 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -525,16 +525,10 @@ mymain(void)
     /* qcow2 with a longer backing chain */
     TEST_CHAIN("qcow2-qcow2_qcow2-qcow2_raw-raw", abswrap, VIR_STORAGE_FILE_QCOW2, EXP_PASS);

-    /* Rewrite qcow2 to a missing backing file, with backing type */
-    virCommandFree(cmd);
-    cmd = virCommandNewArgList(qemuimg, "rebase", "-u", "-f", "qcow2",
-                               "-F", "qcow2", "-b", datadir "/bogus",
-                               "qcow2", NULL);
-    if (virCommandRun(cmd, NULL) < 0)
-        ret = -1;
-
     /* Qcow2 file with missing backing file but specified type */
-    TEST_CHAIN("qcow2-qcow2_missing", absqcow2, VIR_STORAGE_FILE_QCOW2, EXP_FAIL);
+    TEST_CHAIN("qcow2-qcow2_missing",
+               abs_srcdir "/virstoragetestdata/images/qcow2_qcow2-missing.qcow2",
+               VIR_STORAGE_FILE_QCOW2, EXP_FAIL);

     /* Qcow2 file with backing protocol instead of file */
     TEST_CHAIN("qcow2-qcow2_nbd-raw",
diff --git a/tests/virstoragetestdata/images/qcow2_qcow2-missing.qcow2 b/tests/virstoragetestdata/images/qcow2_qcow2-missing.qcow2
new file mode 100644
index 0000000000000000000000000000000000000000..cb9afb25dcd0b489fe848160255d9e5b427ddf0f
GIT binary patch
literal 196616
zcmeIuOHPA87y#gb>fR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+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF
z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk
z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs
z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ
zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U
IAaGIwKRetu*Z=?k

literal 0
HcmV?d00001

-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux