Re: [PATCH] generic/071: require falloc -k

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Mon, Jul 18, 2016 at 11:06:44AM +0300, Christoph Hellwig wrote:
> NFSv4.2 supports fallocate, but not the FALLOC_FL_KEEP_SIZE option.
> To avoid a spurious failure test for the correct command.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  tests/generic/071 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/071 b/tests/generic/071
> index 65ed0c7..9d0d136 100755
> --- a/tests/generic/071
> +++ b/tests/generic/071
> @@ -46,7 +46,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>  _supported_fs generic
>  _supported_os Linux
>  _require_scratch
> -_require_xfs_io_command "falloc"
> +_require_xfs_io_command "falloc" "-k"

This stops generic/071 from running no matter what filesystem it's
testing, this is because _require_xfs_io_command only checks whether
xfs_io knows the option (-k) by searching it in help message, not really
running it, i.e.

xfs_io -c "help falloc" | grep -q "^ -k --"

but "help falloc" doesn't follow the normal xfs_io command help format

# xfs_io -c "help falloc"
falloc [-c] [-k] [-p] off len -- allocates space associated with part of a file via fallocate

So the check always returns false, and test always _notrun, with the
additional "-k" switch.

Perhaps we should update _require_xfs_io_command to actually run the
command with the provided additional option?

Thanks,
Eryu
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux