1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

virstoragetest: Use pre-formatted file for non-path extraction test

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-09-08 09:11:54 +02:00
parent 325fce82d1
commit 80412bfbeb
3 changed files with 4 additions and 11 deletions

View File

@ -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",

Binary file not shown.

View File

@ -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