diff mbox series

[1/2] generic/650: add SOAK_DURATION controls

Message ID 169335047798.3523635.5351250494233254529.stgit@frogsfrogsfrogs (mailing list archive)
State New, archived
Headers show
Series fstests: fix cpu hotplug mess | expand

Commit Message

Darrick J. Wong Aug. 29, 2023, 11:07 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Make this test controllable via SOAK_DURATION, for anyone who wants to
perform a long soak test of filesystem vs. cpu hotplug.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/generic/650 |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Zorro Lang Aug. 31, 2023, 3:27 p.m. UTC | #1
On Tue, Aug 29, 2023 at 04:07:58PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Make this test controllable via SOAK_DURATION, for anyone who wants to
> perform a long soak test of filesystem vs. cpu hotplug.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

This makes sense to me, especially you add it to soak group:)

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  tests/generic/650 |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/tests/generic/650 b/tests/generic/650
> index 05a48ef0fd..05c939b84f 100755
> --- a/tests/generic/650
> +++ b/tests/generic/650
> @@ -8,7 +8,7 @@
>  # hotplugging to shake out bugs in the write path.
>  #
>  . ./common/preamble
> -_begin_fstest auto rw stress
> +_begin_fstest auto rw stress soak
>  
>  # Override the default cleanup function.
>  _cleanup()
> @@ -60,13 +60,18 @@ sentinel_file=$tmp.hotplug
>  touch $sentinel_file
>  exercise_cpu_hotplug &
>  
> +fsstress_args=(-w -d $stress_dir)
> +
>  # Cap the number of fsstress threads at one per hotpluggable CPU if we exceed
>  # 1024 IO threads, per maintainer request.
>  nr_cpus=$((LOAD_FACTOR * nr_hotplug_cpus))
>  test "$nr_cpus" -gt 1024 && nr_cpus="$nr_hotplug_cpus"
> +fsstress_args+=(-p $nr_cpus)
> +test -n "$SOAK_DURATION" && fsstress_args+=(--duration="$SOAK_DURATION")
>  
>  nr_ops=$((25000 * TIME_FACTOR))
> -$FSSTRESS_PROG $FSSTRESS_AVOID -w -d $stress_dir -n $nr_ops -p $nr_cpus >> $seqres.full
> +fsstress_args+=(-n $nr_ops)
> +$FSSTRESS_PROG $FSSTRESS_AVOID -w "${fsstress_args[@]}" >> $seqres.full
>  rm -f $sentinel_file
>  
>  # success, all done
>
diff mbox series

Patch

diff --git a/tests/generic/650 b/tests/generic/650
index 05a48ef0fd..05c939b84f 100755
--- a/tests/generic/650
+++ b/tests/generic/650
@@ -8,7 +8,7 @@ 
 # hotplugging to shake out bugs in the write path.
 #
 . ./common/preamble
-_begin_fstest auto rw stress
+_begin_fstest auto rw stress soak
 
 # Override the default cleanup function.
 _cleanup()
@@ -60,13 +60,18 @@  sentinel_file=$tmp.hotplug
 touch $sentinel_file
 exercise_cpu_hotplug &
 
+fsstress_args=(-w -d $stress_dir)
+
 # Cap the number of fsstress threads at one per hotpluggable CPU if we exceed
 # 1024 IO threads, per maintainer request.
 nr_cpus=$((LOAD_FACTOR * nr_hotplug_cpus))
 test "$nr_cpus" -gt 1024 && nr_cpus="$nr_hotplug_cpus"
+fsstress_args+=(-p $nr_cpus)
+test -n "$SOAK_DURATION" && fsstress_args+=(--duration="$SOAK_DURATION")
 
 nr_ops=$((25000 * TIME_FACTOR))
-$FSSTRESS_PROG $FSSTRESS_AVOID -w -d $stress_dir -n $nr_ops -p $nr_cpus >> $seqres.full
+fsstress_args+=(-n $nr_ops)
+$FSSTRESS_PROG $FSSTRESS_AVOID -w "${fsstress_args[@]}" >> $seqres.full
 rm -f $sentinel_file
 
 # success, all done