From: Peter Krempa Date: Wed, 8 Sep 2021 12:08:47 +0000 (+0200) Subject: virstoragetest: Use preformatted qcow2 image for testing relative paths X-Git-Tag: v7.8.0-rc1~279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f36cf91ac54c18981c854c578018796d9359900;p=thirdparty%2Flibvirt.git virstoragetest: Use preformatted qcow2 image for testing relative paths More preparation for eliminating image rewriting. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- 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 0000000000..492d9bca19 Binary files /dev/null and b/tests/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 differ 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