mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
tests/mountable: Fix incorrect use of inspect-os API (RHBZ#957380).
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user