diff mbox

fix up fsx error handling in generic 075 and 112

Message ID 77036f23-97c3-2d62-e3f5-0c3571e71a5a@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Sandeen July 19, 2016, 7:53 p.m. UTC
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>
---


--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/generic/075 b/tests/generic/075
index a2411c6..6a214bc 100755
--- a/tests/generic/075
+++ b/tests/generic/075
@@ -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
diff --git a/tests/generic/112 b/tests/generic/112
index b59cbfa..55be394 100755
--- a/tests/generic/112
+++ b/tests/generic/112
@@ -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