From 8f36cf91ac54c18981c854c578018796d9359900 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 8 Sep 2021 14:08:47 +0200 Subject: [PATCH] virstoragetest: Use preformatted qcow2 image for testing relative paths MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit More preparation for eliminating image rewriting. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- tests/virstoragetest.c | 8 ++++++-- .../images/qcow2_raw-raw-relative.qcow2 | Bin 0 -> 196616 bytes .../out/qcow2-auto_raw-raw-relative | 2 +- .../out/qcow2-qcow2_raw-raw-relative | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 tests/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 15296cc14f..9af8795492 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -498,8 +498,12 @@ mymain(void) VIR_STORAGE_FILE_AUTO, EXP_PASS); /* Qcow2 file with relative raw backing, format provided */ - TEST_CHAIN("qcow2-qcow2_raw-raw-relative", absqcow2, VIR_STORAGE_FILE_QCOW2, EXP_PASS); - TEST_CHAIN("qcow2-auto_raw-raw-relative", absqcow2, VIR_STORAGE_FILE_AUTO, EXP_PASS); + TEST_CHAIN("qcow2-qcow2_raw-raw-relative", + abs_srcdir "/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2", + VIR_STORAGE_FILE_QCOW2, EXP_PASS); + TEST_CHAIN("qcow2-auto_raw-raw-relative", + abs_srcdir "/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2", + VIR_STORAGE_FILE_AUTO, EXP_PASS); /* Rewrite qcow2 file to use absolute backing name */ virCommandFree(cmd); diff --git a/tests/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 b/tests/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 new file mode 100644 index 0000000000000000000000000000000000000000..492d9bca1902564ba0128fee27122f5beb0e9e32 GIT binary patch literal 196616 zc-rmI!3{)E5C-6RC_o(wk?c_iwgnf_qB6AM;w=tV1rpyknMwZ1oTh6(YeW=r=yR93 z>myd@I?_JNzm(!)nVR``F?`4CI_?<&00000000000000000000000000000000000 z00000000000000000000000000000000000000000DuQ8yZ`_I000000000000000 z000000000000000000000000000000000000000000000000000000000000;Puj3 z00000000000000000000000000000000000000000000000000000000000000000 Q00000000000001xZRBtVM*si- literal 0 Hc-jL100001 diff --git a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative index 4a01b24589..f9afc138f0 100644 --- a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative +++ b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative @@ -1,4 +1,4 @@ -path:ABS_BUILDDIR/virstoragedata/qcow2 +path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 backingStoreRaw: capacity: 0 encryption: 0 diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative index a1fb142e98..6e3f7ab339 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative +++ b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative @@ -1,4 +1,4 @@ -path:ABS_BUILDDIR/virstoragedata/qcow2 +path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 backingStoreRaw: raw capacity: 1024 encryption: 0 @@ -8,7 +8,7 @@ format:14 protocol:none hostname: -path:ABS_BUILDDIR/virstoragedata/raw +path:ABS_SRCDIR/virstoragetestdata/images/raw backingStoreRaw: capacity: 0 encryption: 0 -- 2.47.2