[PATCH 10/24] virstoragetest: Use pre-formatted file for non-path extraction test

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

 



This one doesn't require using qemu-img either.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/virstoragetest.c                         |  13 +++----------
 .../images/qcow2_nbd-raw.qcow2                 | Bin 0 -> 196616 bytes
 .../virstoragetestdata/out/qcow2-qcow2_nbd-raw |   2 +-
 3 files changed, 4 insertions(+), 11 deletions(-)
 create mode 100644 tests/virstoragetestdata/images/qcow2_nbd-raw.qcow2

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 96aeaef9ce..8d3dde265f 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -536,17 +536,10 @@ mymain(void)
     /* Qcow2 file with missing backing file but specified type */
     TEST_CHAIN("qcow2-qcow2_missing", absqcow2, VIR_STORAGE_FILE_QCOW2, EXP_FAIL);

-
-    /* Rewrite qcow2 to use an nbd: protocol as backend */
-    virCommandFree(cmd);
-    cmd = virCommandNewArgList(qemuimg, "rebase", "-u", "-f", "qcow2",
-                               "-F", "raw", "-b", "nbd+tcp://example.org:6000/blah",
-                               "qcow2", NULL);
-    if (virCommandRun(cmd, NULL) < 0)
-        ret = -1;
-
     /* Qcow2 file with backing protocol instead of file */
-    TEST_CHAIN("qcow2-qcow2_nbd-raw", absqcow2, VIR_STORAGE_FILE_QCOW2, EXP_PASS);
+    TEST_CHAIN("qcow2-qcow2_nbd-raw",
+               abs_srcdir "/virstoragetestdata/images/qcow2_nbd-raw.qcow2",
+               VIR_STORAGE_FILE_QCOW2, EXP_PASS);

     /* qed file */
     TEST_CHAIN("qed-qed_raw",
diff --git a/tests/virstoragetestdata/images/qcow2_nbd-raw.qcow2 b/tests/virstoragetestdata/images/qcow2_nbd-raw.qcow2
new file mode 100644
index 0000000000000000000000000000000000000000..848da7ac9da8e115c7e2fbd334a25c1d7e6bfa28
GIT binary patch
literal 196616
zcmeIuJ&x2c6aZ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RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+
z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly
zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF
z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk
z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs
j0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5;&>lOG7e&9Zo

literal 0
HcmV?d00001

diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
index 64acdb880a..08a93b9f32 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
@@ -1,4 +1,4 @@
-path:ABS_BUILDDIR/virstoragedata/qcow2
+path:ABS_SRCDIR/virstoragetestdata/images/qcow2_nbd-raw.qcow2
 backingStoreRaw: nbd+tcp://example.org:6000/blah
 capacity: 1024
 encryption: 0
-- 
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