]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
generic/650: add SOAK_DURATION controls
authorDarrick J. Wong <djwong@kernel.org>
Tue, 29 Aug 2023 23:07:58 +0000 (16:07 -0700)
committerZorro Lang <zlang@kernel.org>
Fri, 1 Sep 2023 19:39:10 +0000 (03:39 +0800)
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>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/650

index 05a48ef0fd1e0849d50db183f37ec10a00512cba..05c939b84f8bf7b785cbf1f4043b66d59644e973 100755 (executable)
@@ -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