From 6769d7e094f2a63679665dd17c64711e69faab42 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Tue, 29 Aug 2023 16:08:03 -0700 Subject: [PATCH] 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 Reviewed-by: Dave Chinner Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- tests/generic/650 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/generic/650 b/tests/generic/650 index 05c939b8..773f93c7 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 -- 2.39.5