xfs
[Top] [All Lists]

Re: [PATCH] xfstests: fix flink test

To: Josef Bacik <jbacik@xxxxxx>
Subject: Re: [PATCH] xfstests: fix flink test
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 8 May 2014 08:44:13 +1000
Cc: linux-btrfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1399496087-20431-1-git-send-email-jbacik@xxxxxx>
References: <1399496087-20431-1-git-send-email-jbacik@xxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, May 07, 2014 at 04:54:47PM -0400, Josef Bacik wrote:
> I don't have flink support in my xfsprogs, but it doesn't fail with "command 
> not
> found" or whatever, it fails because I don't have the -T option.  So fix
> _require_xfs_io_command to check for an invalid option and not run.  This way 
> I
> get notrun instead of a failure.  Thanks,
> 
> Signed-off-by: Josef Bacik <jbacik@xxxxxx>
> ---
>  common/rc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index 5c13db5..4fa7e63 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1258,6 +1258,8 @@ _require_xfs_io_command()
>               _notrun "xfs_io $command support is missing"
>       echo $testio | grep -q "Operation not supported" && \
>               _notrun "xfs_io $command failed (old kernel/wrong fs?)"
> +     echo $testio | grep -q "invalid option" && \
> +             _notrun "xfs_io $command support is missing"
>  }

Yeah, looks like it throws a different error - it treats -T as an
option, not a command. Rather than multiple checks that result in
the same error, why not just:

-       echo $testio | grep -q "not found" && \
+       echo $testio | egrep -q 'not found|invalid option' && \
                _notrun "xfs_io $command support is missing"

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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