We have 3 test cases for this currently: 1) "qcow2->raw" 1.1) VIR_STORAGE_FILE_QCOW2 as top level format 1.2) VIR_STORAGE_FILE_AUTO as top level format 2) "wrap->qcow2->raw" whith just VIR_STORAGE_FILE_QCOW2 This patch adds also testing of VIR_STORAGE_FILE_AUTO for case 2) and removes both 1) subcases as they are being actually tested as part of 2). Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- tests/virstoragetest.c | 7 ++----- ...raw-raw => qcow2-auto_qcow2-qcow2_raw-raw} | 2 +- .../out/qcow2-qcow2_raw-raw | 19 ------------------- 3 files changed, 3 insertions(+), 25 deletions(-) rename tests/virstoragetestdata/out/{qcow2-auto_raw-raw => qcow2-auto_qcow2-qcow2_raw-raw} (74%) delete mode 100644 tests/virstoragetestdata/out/qcow2-qcow2_raw-raw diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 9af8795492..475ff23ce0 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -512,12 +512,9 @@ mymain(void) if (virCommandRun(cmd, NULL) < 0) ret = -1; - /* Qcow2 file with raw as absolute backing, backing format provided */ - TEST_CHAIN("qcow2-qcow2_raw-raw", absqcow2, VIR_STORAGE_FILE_QCOW2, EXP_PASS); - TEST_CHAIN("qcow2-auto_raw-raw", absqcow2, VIR_STORAGE_FILE_AUTO, EXP_PASS); - - /* qcow2 with a longer backing chain */ + /* qcow2 chain with absolute backing formatted with a real qemu-img */ TEST_CHAIN("qcow2-qcow2_qcow2-qcow2_raw-raw", abswrap, VIR_STORAGE_FILE_QCOW2, EXP_PASS); + TEST_CHAIN("qcow2-auto_qcow2-qcow2_raw-raw", abswrap, VIR_STORAGE_FILE_AUTO, EXP_PASS); /* Qcow2 file with missing backing file but specified type */ TEST_CHAIN("qcow2-qcow2_missing", diff --git a/tests/virstoragetestdata/out/qcow2-auto_raw-raw b/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw similarity index 74% rename from tests/virstoragetestdata/out/qcow2-auto_raw-raw rename to tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw index 4a01b24589..2ea087592e 100644 --- a/tests/virstoragetestdata/out/qcow2-auto_raw-raw +++ b/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw @@ -1,4 +1,4 @@ -path:ABS_BUILDDIR/virstoragedata/qcow2 +path:ABS_BUILDDIR/virstoragedata/wrap backingStoreRaw: <null> capacity: 0 encryption: 0 diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw deleted file mode 100644 index 57ce62a376..0000000000 --- a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw +++ /dev/null @@ -1,19 +0,0 @@ -path:ABS_BUILDDIR/virstoragedata/qcow2 -backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw -capacity: 1024 -encryption: 0 -relPath:<null> -type:1 -format:14 -protocol:none -hostname:<null> - -path:ABS_BUILDDIR/virstoragedata/raw -backingStoreRaw: <null> -capacity: 0 -encryption: 0 -relPath:<null> -type:1 -format:1 -protocol:none -hostname:<null> -- 2.31.1