On Fri, Mar 01, 2013 at 05:25:59PM +0800, Zheng Liu wrote:
> 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`
> }
$DEFRAG_PROG and $FILEFRAG_PROG should be set up in common.config
with set_prog_path, not in _require_defrag.
Cheers,
Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
|