[PATCH 1/3] xfstests: basic fallocate boundary tests

Christoph Hellwig hch at infradead.org
Sun Jun 21 14:16:57 CDT 2009


On Sat, Jun 20, 2009 at 04:33:55PM -0500, Eric Sandeen wrote:
> hmm this is really testing that xfs_io in particular has fallocate...
> so maybe like this?
> 
> diff --git a/common.rc b/common.rc
> index 39350b3..55aecd6 100644
> --- a/common.rc
> +++ b/common.rc
> @@ -704,6 +704,18 @@ _require_user()
>      [ "$?" == "0" ] || _notrun "$qa_user user not defined."
>  }
>  
> +# check that xfs_io, glibc, kernel, and filesystem all (!) support
> +# fallocate
> +#
> +_require_xfs_io_falloc()
> +	testio=`$XFS_IO_PROG -F -f -c "falloc 0 1m" $TEST_DIR/$tmp.io 2>&1`
> +	rm -f $TEST_DIR/$tmp.io 2>&1 > /dev/null
> +	echo $testio | grep -q "not found" && \
> +		_notrun "xfs_io fallocate support is missing"
> +	echo $testio | grep -q "Operation not supported" && \
> +		_notrun "xfs_io fallocate command failed (old kernel/wrong fs?)"
> +}

Looks good,


Reviewed-by: Christoph Hellwig <hch at lst.de>




More information about the xfs mailing list