tests/mountable: Fix incorrect use of inspect-os API (RHBZ#957380).

This commit is contained in:
Richard W.M. Jones
2013-04-29 19:25:14 +01:00
parent 4e5ed8ff7b
commit 93e64b4448

View File

@@ -34,7 +34,7 @@ if ! $guestfish -a /dev/null run : available btrfs; then
exit 77
fi
rm -f test.qcow2 test.output
rm -f root.tmp test.qcow2 test.output
# Start with the regular (good) fedora image, modify /etc/fstab
# and then inspect it.
@@ -43,7 +43,8 @@ qemu-img create -F raw -b ../guests/fedora-btrfs.img -f qcow2 test.qcow2
# Test that basic inspection works and the expected filesystems are
# found
$guestfish -a test.qcow2 -i <<'EOF' | sort | $canonical > test.output
inspect-get-mountpoints btrfsvol:/dev/sda2/root
inspect-get-roots | head -1 > root.tmp
<! echo inspect-get-mountpoints "`cat root.tmp`"
EOF
if [ "$(cat test.output)" != "/: btrfsvol:/dev/sda2/root
@@ -56,7 +57,8 @@ fi
# Additional sanity check: did we get the release name right?
$guestfish -a test.qcow2 -i <<'EOF' > test.output
inspect-get-product-name btrfsvol:/dev/sda2/root
inspect-get-roots | head -1 > root.tmp
<! echo inspect-get-product-name "`cat root.tmp`"
EOF
if [ "$(cat test.output)" != "Fedora release 14 (Phony)"]; then
@@ -65,5 +67,6 @@ if [ "$(cat test.output)" != "Fedora release 14 (Phony)"]; then
exit 1
fi
rm root.tmp
rm test.qcow2
rm test.output