public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: use right path in _require_defrag()
@ 2013-03-01  9:25 Zheng Liu
  2013-03-01  9:21 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Liu @ 2013-03-01  9:25 UTC (permalink / raw)
  To: xfs; +Cc: Zheng Liu

In _require_defrag defragmentation command path is fixed.  That will
cause that this test case is skipped in some distributions.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 common.defrag | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common.defrag b/common.defrag
index ea6c14c..7be8ad9 100644
--- a/common.defrag
+++ b/common.defrag
@@ -24,10 +24,10 @@ _require_defrag()
 {
     case "$FSTYP" in
     xfs)
-        DEFRAG_PROG=/usr/sbin/xfs_fsr
+        DEFRAG_PROG=`which xfs_fsr`
 	;;
     ext4|ext4dev)
-        DEFRAG_PROG=/usr/bin/e4defrag
+        DEFRAG_PROG=`which e4defrag`
 	;;
     btrfs)
 	DEFRAG_PROG="$BTRFS_UTIL_PROG filesystem defragment"
@@ -38,7 +38,7 @@ _require_defrag()
     esac
 
     _require_command $DEFRAG_PROG
-    _require_command /usr/sbin/filefrag
+    _require_command `which filefrag`
 }
 
 _extent_count()
-- 
1.7.12.rc2.18.g61b472e

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-01  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01  9:25 [PATCH] xfstests: use right path in _require_defrag() Zheng Liu
2013-03-01  9:21 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox