diff options
Diffstat (limited to 'cat/test-virt-filesystems.sh')
-rwxr-xr-x | cat/test-virt-filesystems.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cat/test-virt-filesystems.sh b/cat/test-virt-filesystems.sh new file mode 100755 index 00000000..f3c325c6 --- /dev/null +++ b/cat/test-virt-filesystems.sh @@ -0,0 +1,33 @@ +#!/bin/bash - + +export LANG=C +set -e + +output="$(./virt-filesystems -a ../images/fedora.img | sort)" +expected="/dev/VG/LV1 +/dev/VG/LV2 +/dev/VG/LV3 +/dev/VG/Root +/dev/sda1" + +if [ "$output" != "$expected" ]; then + echo "$0: error: mismatch in test 1" + echo "$output" + exit 1 +fi + +output="$(./virt-filesystems -a ../images/fedora.img --all --long --uuid -h --no-title | awk '{print $1}' | sort -u)" +expected="/dev/VG +/dev/VG/LV1 +/dev/VG/LV2 +/dev/VG/LV3 +/dev/VG/Root +/dev/sda +/dev/sda1 +/dev/sda2" + +if [ "$output" != "$expected" ]; then + echo "$0: error: mismatch in test 2" + echo "$output" + exit 1 +fi |