FSTests Archive on lore.kernel.org
 help / color / Atom feed
From: Kusanagi Kouichi <slash@ac.auone-net.jp>
To: fstests@vger.kernel.org
Subject: [PATCH] generic: Use $RESULT_DIR instead of $here
Date: Tue, 3 Dec 2019 21:55:54 +0900
Message-ID: <20191203125554271.ZCVM.12759.ppp.dion.ne.jp@dmta0004.auone-net.jp> (raw)

If $here is not writable, tests fail.

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
---
 tests/generic/075 | 10 +++++-----
 tests/generic/112 |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/generic/075 b/tests/generic/075
index 923c9e4f..df2087c3 100755
--- a/tests/generic/075
+++ b/tests/generic/075
@@ -55,16 +55,16 @@ _do_test()
 	fi
     fi
 
-    # This cd and use of -P gets full debug on $here (not TEST_DEV)
+    # This cd and use of -P gets full debug on "$RESULT_DIR" (not TEST_DEV)
     cd $out
-    if ! $here/ltp/fsx $_param -P $here $seq.$_n $FSX_AVOID &>/dev/null
+    if ! $here/ltp/fsx $_param -P "$RESULT_DIR" $seq.$_n $FSX_AVOID &>/dev/null
     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
+	mv "$RESULT_DIR"/$seq.$_n.fsxlog $seqres.$_n.fsxlog
 	od -xAx $seqres.$_n.full > $seqres.$_n.bad
-	od -xAx $here/$seq.$_n.fsxgood > $seqres.$_n.good
-	rm -f $here/$seq.$_n.fsxgood
+	od -xAx "$RESULT_DIR"/$seq.$_n.fsxgood > $seqres.$_n.good
+	rm -f "$RESULT_DIR"/$seq.$_n.fsxgood
 	status=1
 	exit
     fi
diff --git a/tests/generic/112 b/tests/generic/112
index 18d610ee..580c4cd5 100755
--- a/tests/generic/112
+++ b/tests/generic/112
@@ -55,12 +55,12 @@ _do_test()
 	fi
     fi
 
-    # This cd and use of -P gets full debug on $here (not TEST_DEV)
+    # This cd and use of -P gets full debug on "$RESULT_DIR" (not TEST_DEV)
     cd $out
-    if ! $here/ltp/fsx $_param -P $here $FSX_AVOID $seq.$_n &>/dev/null
+    if ! $here/ltp/fsx $_param -P "$RESULT_DIR" $FSX_AVOID $seq.$_n &>/dev/null
     then
 	echo "    fsx ($_param) returned $? - see $seq.$_n.full"
-	mv $here/$seq.$_n.fsxlog $seqres.$_n.full
+	mv "$RESULT_DIR"/$seq.$_n.fsxlog $seqres.$_n.full
 	status=1
 	exit
     fi
-- 
2.24.0


                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191203125554271.ZCVM.12759.ppp.dion.ne.jp@dmta0004.auone-net.jp \
    --to=slash@ac.auone-net.jp \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git