tests: specify the image format when possible

When possible, make the disk image format explicit when invoking tools
or using add-drive. This avoids warnings from qemu about the unspecified
format for the image, and also makes qemu slightly faster (skipping the
disk image probing).
Tests checking the image probing are not touched.

This changes also:
- old-style invocations of tools (`$tool $filename`) into new style
  (`$tool -a $filename`)
- add-drive-ro/add-drive-with-if guestfish commands into add/add-drive
  with explicit readonly/iface arguments

There should be no change in the tests results.
This commit is contained in:
Pino Toscano
2016-05-19 17:52:32 +02:00
parent b5c81b3e12
commit 64bb9edd52
41 changed files with 65 additions and 64 deletions

View File

@@ -32,7 +32,7 @@ rm -f inspect-fstab-md-{1,2}.img inspect-fstab-md.fstab inspect-fstab-md.output
cp ../../test-data/phony-guests/fedora-md1.img inspect-fstab-md-1.img
cp ../../test-data/phony-guests/fedora-md2.img inspect-fstab-md-2.img
guestfish -i inspect-fstab-md-[12].img <<'EOF' | sort > inspect-fstab-md.output
guestfish -i --format=raw -a inspect-fstab-md-1.img --format=raw -a inspect-fstab-md-2.img <<'EOF' | sort > inspect-fstab-md.output
exists /boot/grub/grub.conf
EOF
@@ -47,13 +47,13 @@ cat <<'EOF' > inspect-fstab-md.fstab
/dev/md/boot /boot ext2 default 0 0
EOF
guestfish -a inspect-fstab-md-1.img -a inspect-fstab-md-2.img <<'EOF'
guestfish --format=raw -a inspect-fstab-md-1.img --format=raw -a inspect-fstab-md-2.img <<'EOF'
run
mount /dev/VG/Root /
upload inspect-fstab-md.fstab /etc/fstab
EOF
guestfish -i inspect-fstab-md-[12].img <<'EOF' | sort > inspect-fstab-md.output
guestfish -i --format=raw -a inspect-fstab-md-1.img --format=raw -a inspect-fstab-md-2.img <<'EOF' | sort > inspect-fstab-md.output
exists /boot/grub/grub.conf
EOF