All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: make "BTRFS_UTIL_PROG filesystem defragment" work
@ 2015-04-14  9:01 Liu Bo
  2015-04-14  9:14 ` Filipe David Manana
  0 siblings, 1 reply; 3+ messages in thread
From: Liu Bo @ 2015-04-14  9:01 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs

_require_defrag() needs to check if the command is executable, but btrfs has
its subcommand "filesystem defragment", which makes this checking fail.

This workarounds it and now we can run case generic/324, generic/018, btrfs/005.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 common/defrag | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/common/defrag b/common/defrag
index f923dc0..f36a68b 100644
--- a/common/defrag
+++ b/common/defrag
@@ -37,7 +37,11 @@ _require_defrag()
 	;;
     esac
 
-    _require_command "$DEFRAG_PROG" defragment
+    if [ "$FSTYP" == "btrfs" ]; then
+	    _require_command "$BTRFS_UTIL_PROG" defragment
+    else
+	    _require_command "$DEFRAG_PROG" defragment
+    fi
     _require_xfs_io_command "fiemap"
 }
 
-- 
1.8.2.1


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

end of thread, other threads:[~2015-04-14  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-14  9:01 [PATCH] xfstests: make "BTRFS_UTIL_PROG filesystem defragment" work Liu Bo
2015-04-14  9:14 ` Filipe David Manana
2015-04-14  9:29   ` Liu Bo

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.