xfs
[Top] [All Lists]

[PATCH] xfstests: use right path in _require_defrag()

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfstests: use right path in _require_defrag()
From: Zheng Liu <gnehzuil.liu@xxxxxxxxx>
Date: Fri, 1 Mar 2013 17:25:59 +0800
Cc: Zheng Liu <wenqing.lz@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=STVDlqKY/JoRpsJZ8IyJ/H0+ttrqXgHfUyqdLcjc4uI=; b=vtY5VdPJ4zCT/do+emDGahgN/cFkaf3WVF6/UfJlPF5i321smb3iGAXCToo3henP6d VrfgxbRMCdIgJK2/oUTKwH36D1YFpYpxqv9pqY9PV895JeVfsPgZ30oD8AWANxjr5xG9 9f1utiwIPg+zrsyE1AokvTcp0B8GFPWDdlQF9hCUiIidW5xI6AGTLRFKMmvaq9n0Welu yZ+mq6gjOjILv6rhVkkbXHzGjvCxepDamIAaWlyag5MduDli3FHDwNv34M1jTuAc5kVp 8Cq1ol0YZmPJokVHlv+FX/eKSXn1L2UkPFD8D/o0UtC/j94bKYRTNpOuUlA2kjUukwsg zpkw==
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@xxxxxxxxxx>
---
 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

<Prev in Thread] Current Thread [Next in Thread>