diff options
| author | Richard W.M. Jones <rjones@redhat.com> | 2012-06-25 09:03:39 +0100 |
|---|---|---|
| committer | Richard W.M. Jones <rjones@redhat.com> | 2012-06-25 11:20:35 +0100 |
| commit | 729bb9c6b5ae0c0e7c68dc802b1617936062f966 (patch) | |
| tree | 29d163c888a727dec893bde7277a8f452f235420 /fish | |
| parent | 78a515ec4a4e8650bd2e1ffc0bfbb97b9568306d (diff) | |
| download | libguestfs-729bb9c6b5ae0c0e7c68dc802b1617936062f966.tar.gz libguestfs-729bb9c6b5ae0c0e7c68dc802b1617936062f966.tar.xz libguestfs-729bb9c6b5ae0c0e7c68dc802b1617936062f966.zip | |
launch: Treat /dev/null specially, for old KVM.
Old KVM can't add /dev/null readonly. Treat /dev/null as a special
case.
We also fix a few tests where /dev/null was being used with
format=qcow2. This was always incorrect behaviour, but qemu appears
to tolerate it.
Diffstat (limited to 'fish')
| -rwxr-xr-x | fish/test-a.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fish/test-a.sh b/fish/test-a.sh index 20cc5cd8..4a607907 100755 --- a/fish/test-a.sh +++ b/fish/test-a.sh @@ -21,25 +21,29 @@ set -e rm -f test.out +rm -f test1.img -./guestfish -x -a /dev/null </dev/null >test.out 2>&1 +./guestfish sparse test1.img 100M + +./guestfish -x -a test1.img </dev/null >test.out 2>&1 ! grep -sq 'add_drive.*format' test.out -./guestfish -x --format=qcow2 -a /dev/null </dev/null >test.out 2>&1 +./guestfish -x --format=qcow2 -a test1.img </dev/null >test.out 2>&1 grep -sq 'add_drive.*format:qcow2' test.out -./guestfish -x --ro --format=qcow2 -a /dev/null </dev/null >test.out 2>&1 +./guestfish -x --ro --format=qcow2 -a test1.img </dev/null >test.out 2>&1 grep -sq 'add_drive.*readonly:true.*format:qcow2' test.out -./guestfish -x --format -a /dev/null </dev/null >test.out 2>&1 +./guestfish -x --format -a test1.img </dev/null >test.out 2>&1 ! grep -sq 'add_drive.*format' test.out -./guestfish -x -a /dev/null --format=qcow2 </dev/null >test.out 2>&1 +./guestfish -x -a test1.img --format=qcow2 </dev/null >test.out 2>&1 ! grep -sq 'add_drive.*format' test.out -rm -f test.out +rm test.out +rm test1.img |
