Re: [PATCH 22/24] xfs/141: run for longer with TIME_FACTOR

Zorro Lang
2020-09-16T15:30:54Z

On Mon, Sep 14, 2020 at 06:45:15PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Allow the test runner to run the crash loop in this test for longer by
> setting TIME_FACTOR. This has been useful for finding bugs in log
> recovery.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---

Good to me,
Reviewed-by: Zorro Lang <zlang@redhat.com>

> tests/xfs/141 | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>
> diff --git a/tests/xfs/141 b/tests/xfs/141
> index 754ca37a..ef7210ff 100755
> --- a/tests/xfs/141
> +++ b/tests/xfs/141
> @@ -50,7 +50,8 @@ _scratch_mount
>
> sdev=$(_short_dev $SCRATCH_DEV)
>
> -for i in $(seq 1 5); do
> +nr_times=$((TIME_FACTOR * 5))
> +while [ $nr_times -gt 0 ]; do
> # Enable error injection. Use a random bad crc factor up to 100
> # (increase this value to run fsstress longer).
> factor=$((RANDOM % 100 + 1))
> @@ -65,6 +66,7 @@ for i in $(seq 1 5); do
> # write.
> _scratch_unmount
> _scratch_mount
> + nr_times=$((nr_times - 1))
> done
>
> # success, all done
>