aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-08-29 16:08:03 -0700
committerZorro Lang <zlang@kernel.org>2023-09-02 13:54:38 +0800
commit6769d7e094f2a63679665dd17c64711e69faab42 (patch)
tree04ab17fae946f453b56af90236601d95328cf9f6
parentd8008ba6d6f6d62f5b7406462262b3e4382f667d (diff)
downloadxfstests-dev-6769d7e094f2a63679665dd17c64711e69faab42.tar.gz
generic/650: race mount and unmount with cpu hotplug too
Ritesh Harjani reported that mount and unmount can race with the xfs cpu hotplug notifier hooks and crash the kernel, which isfixed by: https://lore.kernel.org/linux-xfs/ZO6J4W9msOixUk05@dread.disaster.area/T/#t Extend this test to include that. 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/65013
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/generic/650 b/tests/generic/650
index 05c939b84f..773f93c7cb 100755
--- a/tests/generic/650
+++ b/tests/generic/650
@@ -67,11 +67,18 @@ fsstress_args=(-w -d $stress_dir)
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")
+if [ -n "$SOAK_DURATION" ]; then
+ test "$SOAK_DURATION" -lt 10 && SOAK_DURATION=10
+ fsstress_args+=(--duration="$((SOAK_DURATION / 10))")
+fi
-nr_ops=$((25000 * TIME_FACTOR))
+nr_ops=$((2500 * TIME_FACTOR))
fsstress_args+=(-n $nr_ops)
-$FSSTRESS_PROG $FSSTRESS_AVOID -w "${fsstress_args[@]}" >> $seqres.full
+for ((i = 0; i < 10; i++)); do
+ $FSSTRESS_PROG $FSSTRESS_AVOID -w "${fsstress_args[@]}" >> $seqres.full
+ _test_cycle_mount
+done
+
rm -f $sentinel_file
# success, all done