From 80412bfbebec67795fbe7dbe926a85c5de46cbbf Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 8 Sep 2021 09:11:54 +0200 Subject: [PATCH] virstoragetest: Use pre-formatted file for non-path extraction test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This one doesn't require using qemu-img either. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- 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 zc-rmIF;3h-6b9h&E(hQSxF!<2NXY!QIG)QlRT1VngbaU+AN%u{LsF_9 zj`iL0=eH^9IfS}Nd0%dtJTJA__9@*DdG3ove9SR*Ra@3ouFBh{jql!HZu{Mk;y5;a zSLXc?KkD+3-_@}$zkV)bms1nR_r4$6>ST