summaryrefslogtreecommitdiffstats
path: root/cat/test-virt-cat.sh
blob: 79844562ce6c2278abfa87a1ad8a102e726c8748 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash -

export LANG=C
set -e

# Read out the test files from the image using virt-cat.
if [ "$(./virt-cat ../tests/guests/fedora.img /etc/test1)" != "abcdefg" ]; then
    echo "$0: error: mismatch in file test1"
    exit 1
fi
if [ "$(./virt-cat ../tests/guests/fedora.img /etc/test2)" != "" ]; then
    echo "$0: error: mismatch in file test2"
    exit 1
fi