aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/check
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-09-04 13:16:05 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2013-09-06 15:25:10 +0200
commit8f94b077877151de93a63c73f796897309568ddb (patch)
treeba39f73af3c7bf1a6ee3f3848716075370a5cde0 /tests/qemu-iotests/check
parent79e40ab10e1f4450c11ab8430cb2547146ded639 (diff)
downloadqemu-8f94b077877151de93a63c73f796897309568ddb.zip
qemu-8f94b077877151de93a63c73f796897309568ddb.tar.gz
qemu-8f94b077877151de93a63c73f796897309568ddb.tar.bz2
qemu-iotests: Fixed test case 026
The reference output for test case 026 hasn't been updated in a long time and it's one of the "known failing" cases. This patch updates the reference output so that unintentional changes can be reliably detected again. The problem with this test case is that it produces different output depending on whether -nocache is used or not. The solution of this patch is to actually have two different reference outputs. If nnn.out.nocache exists, it is used as the reference output for -nocache; otherwise, nnn.out stays valid for both cases. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/check')
-rwxr-xr-xtests/qemu-iotests/check12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index e51bae8..4ecf497 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -239,12 +239,18 @@ do
echo -n " [failed, exit status $sts]"
err=true
fi
- if [ ! -f $seq.out ]
+
+ reference=$seq.out
+ if (echo $QEMU_IO_OPTIONS | grep -s -- '--nocache' > /dev/null); then
+ [ -f $seq.out.nocache ] && reference=$seq.out.nocache
+ fi
+
+ if [ ! -f $reference ]
then
echo " - no qualified output"
err=true
else
- if diff -w $seq.out $tmp.out >/dev/null 2>&1
+ if diff -w $reference $tmp.out >/dev/null 2>&1
then
echo ""
if $err
@@ -256,7 +262,7 @@ do
else
echo " - output mismatch (see $seq.out.bad)"
mv $tmp.out $seq.out.bad
- $diff -w $seq.out $seq.out.bad
+ $diff -w $reference $seq.out.bad
err=true
fi
fi