aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-08-29 16:07:58 -0700
committerZorro Lang <zlang@kernel.org>2023-09-02 03:39:10 +0800
commitd8008ba6d6f6d62f5b7406462262b3e4382f667d (patch)
treeeb4dffbfcdc9d19e3de65994a17b50c001536c56
parentc1b325152870579db943aad71e91674994d8c178 (diff)
downloadxfstests-dev-d8008ba6d6f6d62f5b7406462262b3e4382f667d.tar.gz
generic/650: add SOAK_DURATION controls
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>
-rwxr-xr-xtests/generic/6509
1 files 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