fish: Fix tests that specified qcow2 format, but passed a raw format disk.

In some tests we were specifying qcow2 as the image format when adding
a disk, but actually passing a raw format image.

Libguestfs previously did not detect this until guestfs_launch, but it
was still a bug to pass an incorrect format to guestfs_add_drive_opts.

It only worked because these tests never call guestfs_launch.

A later commit in this series will cause this to be detected
(sometimes) during guestfs_add_drive_opts.
This commit is contained in:
Richard W.M. Jones
2014-01-16 15:03:04 +00:00
parent b3cf877e58
commit 07e47513df
3 changed files with 5 additions and 2 deletions

View File

@@ -29,6 +29,9 @@ $VG ./guestfish -x -a test-a.img </dev/null >test-a.out 2>&1
! grep -sq 'add_drive.*format' test-a.out
rm test-a.img
qemu-img create -f qcow2 test-a.img 100M
$VG ./guestfish -x --format=qcow2 -a test-a.img </dev/null >test-a.out 2>&1
grep -sq 'add_drive.*format:qcow2' test-a.out

View File

@@ -27,7 +27,7 @@ cwd="$(pwd)"
$VG ./guestfish sparse test-add-domain-1.img 1M
$VG ./guestfish sparse test-add-domain-2.img 1M
$VG ./guestfish sparse test-add-domain-3.img 1M
qemu-img create -f qcow2 test-add-domain-3.img 1M
$VG ./guestfish sparse test-add-domain-4.img 1M
# Libvirt test XML, see libvirt.git/examples/xml/test/testnode.xml

View File

@@ -27,7 +27,7 @@ cwd="$(pwd)"
$VG ./guestfish sparse test-d-1.img 1M
$VG ./guestfish sparse test-d-2.img 1M
$VG ./guestfish sparse test-d-3.img 1M
qemu-img create -f qcow2 test-d-3.img 1M
$VG ./guestfish sparse test-d-4.img 1M
# Libvirt test XML, see libvirt.git/examples/xml/test/testnode.xml