summaryrefslogtreecommitdiffstats
path: root/cat/test-virt-cat.sh
blob: 19b8d8756f60f265edc4c8aeb36ea82d03314011 (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 ../images/fedora.img /etc/test1)" != "abcdefg" ]; then
    echo "$0: error: mismatch in file test1"
    exit 1
fi
if [ "$(./virt-cat ../images/fedora.img /etc/test2)" != "" ]; then
    echo "$0: error: mismatch in file test2"
    exit 1
fi