]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: use right defrag program path
authorZheng Liu <wenqing.lz@taobao.com>
Fri, 1 Mar 2013 14:17:13 +0000 (14:17 +0000)
committerRich Johnston <rjohnston@sgi.com>
Tue, 5 Mar 2013 15:50:29 +0000 (09:50 -0600)
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>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
common.config
common.defrag

index e3f9e452c7d3fd6b02a4873ff097ffc1930a849e..43549699ecfb27caf25fa7bfc5c519b749a77a5e 100644 (file)
@@ -164,6 +164,8 @@ export XFS_COPY_PROG="`set_prog_path xfs_copy`"
 export FSTRIM_PROG="`set_prog_path fstrim`"
 export DUMPE2FS_PROG="`set_prog_path dumpe2fs`"
 export FIO_PROG="`set_prog_path fio`"
+export FILEFRAG_PROG="`set_prog_path filefrag`"
+export E4DEFRAG_PROG="`set_prog_path e4defrag`"
 
 # Generate a comparable xfsprogs version number in the form of
 # major * 10000 + minor * 100 + release
index 84b1e65b1e2f8ed26cad263c99a18fa0810a8219..9c9eb9b1d2688114973c53c6f3249fd28e1f561e 100644 (file)
@@ -24,10 +24,10 @@ _require_defrag()
 {
     case "$FSTYP" in
     xfs)
-        DEFRAG_PROG="`set_prog_path xfs_fsr`"
+        DEFRAG_PROG="$XFS_FSR_PROG"
        ;;
     ext4|ext4dev)
-        DEFRAG_PROG="`set_prog_path e4defrag`"
+        DEFRAG_PROG="$E4DEFRAG_PROG"
        ;;
     btrfs)
        DEFRAG_PROG="$BTRFS_UTIL_PROG filesystem defragment"
@@ -38,13 +38,13 @@ _require_defrag()
     esac
 
     _require_command $DEFRAG_PROG
-    _require_command /usr/sbin/filefrag
+    _require_command $FILEFRAG_PROG
 }
 
 _extent_count()
 {
-       filefrag $1 | awk '{print $2}'
-       filefrag -v $1  >> $seq.full 2>&1
+       $FILEFRAG_PROG $1 | awk '{print $2}'
+       $FILEFRAG_PROG -v $1  >> $seq.full 2>&1
 }
 
 # Defrag file, check it, and remove it.