xfs
[Top] [All Lists]

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

To: Zheng Liu <gnehzuil.liu@xxxxxxxxx>
Subject: Re: [PATCH] xfstests: use right path in _require_defrag()
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 1 Mar 2013 20:21:18 +1100
Cc: xfs@xxxxxxxxxxx, Zheng Liu <wenqing.lz@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1362129959-4504-1-git-send-email-wenqing.lz@xxxxxxxxxx>
References: <1362129959-4504-1-git-send-email-wenqing.lz@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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

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