Re: [PATCH 2/2] fstests: skip tests that require XFS_IOC_ALLOCSP

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



On Tue, Jan 25, 2022 at 06:11:54PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Deprecating this, so turn off the tests that require it.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---

Looks good to me,
Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx>

>  common/rc      |    4 ++--
>  ltp/fsstress.c |    4 ++++
>  tests/xfs/107  |    1 +
>  3 files changed, 7 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/common/rc b/common/rc
> index b3289de9..6a0648ad 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2507,8 +2507,8 @@ _require_xfs_io_command()
>  		rm -f $testcopy > /dev/null 2>&1
>  		param_checked="$param"
>  		;;
> -	"falloc" )
> -		testio=`$XFS_IO_PROG -F -f -c "falloc $param 0 1m" $testfile 2>&1`
> +	"falloc"|"allocsp")
> +		testio=`$XFS_IO_PROG -F -f -c "$command $param 0 1m" $testfile 2>&1`
>  		param_checked="$param"
>  		;;
>  	"fpunch" | "fcollapse" | "zero" | "fzero" | "finsert" | "funshare")
> diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> index 5f3126e6..23188467 100644
> --- a/ltp/fsstress.c
> +++ b/ltp/fsstress.c
> @@ -2045,6 +2045,7 @@ afsync_f(opnum_t opno, long r)
>  void
>  allocsp_f(opnum_t opno, long r)
>  {
> +#ifdef XFS_IOC_ALLOCSP64
>  	int		e;
>  	pathname_t	f;
>  	int		fd;
> @@ -2094,6 +2095,7 @@ allocsp_f(opnum_t opno, long r)
>  	}
>  	free_pathname(&f);
>  	close(fd);
> +#endif
>  }
>  
>  #ifdef AIO
> @@ -3733,6 +3735,7 @@ fiemap_f(opnum_t opno, long r)
>  void
>  freesp_f(opnum_t opno, long r)
>  {
> +#ifdef XFS_IOC_FREESP64
>  	int		e;
>  	pathname_t	f;
>  	int		fd;
> @@ -3781,6 +3784,7 @@ freesp_f(opnum_t opno, long r)
>  		       procid, opno, f.path, st, (long long)off, e);
>  	free_pathname(&f);
>  	close(fd);
> +#endif
>  }
>  
>  void
> diff --git a/tests/xfs/107 b/tests/xfs/107
> index 577094b2..1ea9c492 100755
> --- a/tests/xfs/107
> +++ b/tests/xfs/107
> @@ -20,6 +20,7 @@ _begin_fstest auto quick prealloc
>  _supported_fs xfs
>  _require_test
>  _require_scratch
> +_require_xfs_io_command allocsp		# detect presence of ALLOCSP ioctl
>  _require_test_program allocstale
>  
>  # Create a 256MB filesystem to avoid running into mkfs problems with too-small
> 




[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