From 8f94b077877151de93a63c73f796897309568ddb Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 4 Sep 2013 13:16:05 +0200 Subject: 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 Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/check | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests/qemu-iotests/check') diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index e51bae8cee..4ecf497d8e 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 -- cgit v1.2.3