Re: [PATCH 4/4] xfs: regresion test for fsmap problems with realtime

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

 



On Tue, Aug 31, 2021 at 05:12:26PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> This is a regression test for:
> 
> xfs: make xfs_rtalloc_query_range input parameters const
> xfs: fix off-by-one error when the last rt extent is in use
> xfs: make fsmap backend function key parameters const
> 
> In which we synthesize an XFS with a realtime volume and a special
> realtime volume to trip the bugs fixed by all three patches that
> resulted in incomplete fsmap output.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  tests/xfs/922     |  183 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/922.out |    2 +
>  2 files changed, 185 insertions(+)
>  create mode 100755 tests/xfs/922
>  create mode 100644 tests/xfs/922.out
> 
> 
> diff --git a/tests/xfs/922 b/tests/xfs/922
> new file mode 100755
> index 00000000..95304d57
> --- /dev/null
> +++ b/tests/xfs/922
> @@ -0,0 +1,183 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2021 Oracle.  All Rights Reserved.
> +#
> +# FS QA Test 922
> +#
> +# Regression test for commits:
> +#
> +# c02f6529864a ("xfs: make xfs_rtalloc_query_range input parameters const")
> +# 9ab72f222774 ("xfs: fix off-by-one error when the last rt extent is in use")
> +# 7e1826e05ba6 ("xfs: make fsmap backend function key parameters const")
> +#
> +# These commits fix a bug in fsmap where the data device fsmap function would
> +# corrupt the high key passed to the rt fsmap function if the data device
> +# number is smaller than the rt device number and the data device itself is
> +# smaller than the rt device.
> +#
> +. ./common/preamble
> +_begin_fstest auto fsmap
> +
> +_cleanup()
> +{
> +	cd /
> +	rm -r -f $tmp.*
> +	_scratch_unmount
> +	test -n "$ddloop" && _destroy_loop_device "$ddloop"
> +	test -n "$rtloop" && _destroy_loop_device "$rtloop"
> +	test -n "$ddfile" && rm -f "$ddfile"
> +	test -n "$rtfile" && rm -f "$rtfile"
> +	test -n "$old_use_external" && USE_EXTERNAL="$old_use_external"
> +}
> +
> +# real QA test starts here
> +
> +# Modify as appropriate.
> +_supported_fs generic

_supported_fs xfs

> +_require_test

Also need the following _require rules

_require_loop
_require_xfs_io_command "falloc"
_require_xfs_io_command "fpunch"
_require_xfs_io_command "fsmap"

I've fixed them all on commit.

Thanks,
Eryu



[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