]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
generic/075,112: fix up fsx error handling
authorEric Sandeen <sandeen@redhat.com>
Tue, 19 Jul 2016 19:53:25 +0000 (12:53 -0700)
committerEryu Guan <eguan@redhat.com>
Wed, 20 Jul 2016 03:15:52 +0000 (11:15 +0800)
When fsx fails we try to copy failure state to the results/
dir, but in some cases we are using $seqres instead of
$seq or $seq instead of $here/$seq; fix this up so the
failure state is accurately captured in the results/ dir.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/075
tests/generic/112

index a2411c66c291c1ee6a077fb6f1924db91f0a021d..6a214bc34d27d9200a340e9dde3003b25568e2fb 100755 (executable)
@@ -79,8 +79,10 @@ _do_test()
     then
        echo "    fsx ($_param) failed, $? - compare $seqres.$_n.{good,bad,fsxlog}"
        mv $out/$seq.$_n $seqres.$_n.full
+       mv $here/$seq.$_n.fsxlog $seqres.$_n.fsxlog
        od -xAx $seqres.$_n.full > $seqres.$_n.bad
-       od -xAx $seqres.$_n.fsxgood > $seqres.$_n.good
+       od -xAx $here/$seq.$_n.fsxgood > $seqres.$_n.good
+       rm -f $here/$seq.$_n.fsxgood
        status=1
        exit
     fi
index b59cbfa2c3e00f891aa0bb9e1d82833147dd14fd..55be3948425e6a3bb843b25b848a1583e1e69e01 100755 (executable)
@@ -78,7 +78,7 @@ _do_test()
     if ! $here/ltp/fsx $_param -P $here $FSX_AVOID $seq.$_n &>/dev/null
     then
        echo "    fsx ($_param) returned $? - see $seq.$_n.full"
-       mv $seq.$_n.fsxlog $seqres.$_n.full
+       mv $here/$seq.$_n.fsxlog $seqres.$_n.full
        status=1
        exit
     fi