Re: [PATCH] generic/033: Check that the 'fzero' operations supports KEEP_SIZE

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

 



On Thu, Apr 24, 2025 at 03:57:30PM -0400, Anna Schumaker wrote:
> From: Anna Schumaker <anna.schumaker@xxxxxxxxxx>
> 
> Otherwise this test will fail on filesystems that implement
> FALLOC_FL_ZERO_RANGE but not the optional FALLOC_FL_KEEP_SIZE flag.
> 
> Signed-off-by: Anna Schumaker <anna.schumaker@xxxxxxxxxx>
> ---
>  tests/generic/033 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/033 b/tests/generic/033
> index a9a9ff5a3431..a33f6add67bf 100755
> --- a/tests/generic/033
> +++ b/tests/generic/033
> @@ -20,7 +20,7 @@ _begin_fstest auto quick rw zero
>  
>  # Modify as appropriate.
>  _require_scratch
> -_require_xfs_io_command "fzero"
> +_require_xfs_io_command "fzero" "-k"

I wonder, does this test even need KEEP_SIZE?  It writes 64MB to the
file, then it fzeros every other 4k up to (64M-4k), then fzeroes
everything else.  AFAICT the fzero commands never exceed the file
size...though I could be wrong.

--D

>  
>  _scratch_mkfs >/dev/null 2>&1
>  _scratch_mount
> -- 
> 2.49.0
> 
> 




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux