All of
 help / color / mirror / Atom feed
From: Jan Kara <>
Cc: Jan Kara <>
Subject: [PATCH v2] xfs/195: Use XFSDUMP_PROG instead of xfsdump directly
Date: Fri, 17 Oct 2014 11:51:15 +0200	[thread overview]
Message-ID: <> (raw)

Use appropriate environment variable (XFSDUMP_PROG) instead of
hardcoding 'xfsdump' name. Also make the test fail graciously when
xfsdump isn't installed.

We also make XFSDUMP_PROG be equal to empty string instead of -e when
xfsdump isn't installed. The changes require some tweaking to output
filtering since full command path now appears in the output.

Signed-off-by: Jan Kara <>
 common/config | 6 +++++-
 tests/xfs/195 | 7 ++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/common/config b/common/config
index 64506a23ac6b..1cb08c0ee441 100644
--- a/common/config
+++ b/common/config
@@ -163,7 +163,11 @@ export XFS_IO_PROG="`set_prog_path xfs_io`"
 export XFS_PARALLEL_REPAIR_PROG="`set_prog_path xfs_prepair`"
 export XFS_PARALLEL_REPAIR64_PROG="`set_prog_path xfs_prepair64`"
 export __XFSDUMP_PROG="`set_prog_path xfsdump`"
+if [ -n "$__XFSDUMP_PROG" ]; then
+	export XFSDUMP_PROG=""
 export XFSRESTORE_PROG="`set_prog_path xfsrestore`"
 export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
 export GETFATTR_PROG="`set_prog_path getfattr`"
diff --git a/tests/xfs/195 b/tests/xfs/195
index c7bc7b815a2c..76f130ebdf66 100755
--- a/tests/xfs/195
+++ b/tests/xfs/195
@@ -48,11 +48,11 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
-	xfsdump -l 0 -s d -F  \
+	$XFSDUMP_PROG -l 0 -s d -F  \
 		-L prova -M prova \
-		-f $TEST_DIR/dumpfile -e -v excluded_files=debug $TEST_DIR \
+		-f $TEST_DIR/dumpfile -v excluded_files=debug $TEST_DIR \
 		| grep "ino $inum" \
-		| sed -e 's/xfsdump: pruned ino [0-9]*, owner 0, estimated size 0: skip flag set/xfsdump: pruned ino NNN, owner 0, estimated size 0: skip flag set/'
+		| sed -e 's/.*xfsdump: pruned ino [0-9]*, owner 0, estimated size 0: skip flag set/xfsdump: pruned ino NNN, owner 0, estimated size 0: skip flag set/'
 # get standard environment, filters and checks
@@ -65,6 +65,7 @@ _supported_os Linux
+_require_command $XFSDUMP_PROG xfsdump
 echo "Preparing subtree"
 mkdir $TEST_DIR/d

                 reply	other threads:[~2014-10-17  9:51 UTC|newest]

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

Reply instructions:

You may reply publicly 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:

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

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.