Re: [PATCH 1/3] generic/092: skip test if file allocation unit isn't aligned

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

 



On Tue, Sep 27, 2022 at 09:23:56PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> This test exercises allocation behavior when truncating a preallocated
> file down to 5M and then up to 7M.  If those two sizes aren't aligned
> with the file allocation unit length, then the FIEMAP output will show
> blocks beyond EOF.  That will cause trouble with the golden output, so
> skip this test if that will be the case.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  tests/generic/092 |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 
> diff --git a/tests/generic/092 b/tests/generic/092
> index 505e0ec84f..d7c93ca792 100755
> --- a/tests/generic/092
> +++ b/tests/generic/092
> @@ -28,6 +28,12 @@ _require_test
>  _require_xfs_io_command "falloc"
>  _require_xfs_io_command "fiemap"
>  
> +# If the truncation sizes (5M/7M) aren't aligned with the file allocation unit
> +# length, then the FIEMAP output will show blocks beyond EOF.  That will cause
> +# trouble with the golden output, so skip this test if that will be the case.
> +_require_congruent_file_oplen $TEST_DIR $((5 * 1048576))
> +_require_congruent_file_oplen $TEST_DIR $((7 * 1048576))

Make sense to me,

Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx>

> +
>  # First test to make sure that truncating at i_size trims the preallocated bit
>  # past i_size
>  $XFS_IO_PROG -f -c "falloc -k 0 10M" -c "pwrite 0 5M" -c "truncate 5M"\
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux