mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user