From 07e47513dfe77c0c038cc24e714a32fe096bc68f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Jan 2014 15:03:04 +0000 Subject: [PATCH] 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. --- fish/test-a.sh | 3 +++ fish/test-add-domain.sh | 2 +- fish/test-d.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fish/test-a.sh b/fish/test-a.sh index 91adc7756..df892fe85 100755 --- a/fish/test-a.sh +++ b/fish/test-a.sh @@ -29,6 +29,9 @@ $VG ./guestfish -x -a test-a.img 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 test-a.out 2>&1 grep -sq 'add_drive.*format:qcow2' test-a.out diff --git a/fish/test-add-domain.sh b/fish/test-add-domain.sh index 1816b50cf..419c5cfe2 100755 --- a/fish/test-add-domain.sh +++ b/fish/test-add-domain.sh @@ -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 diff --git a/fish/test-d.sh b/fish/test-d.sh index cbbd33e56..b8915055e 100755 --- a/fish/test-d.sh +++ b/fish/test-d.sh @@ -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