2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
4 # Copyright (c) 2017 Google, Inc. All Rights Reserved.
8 # Shutdown stress test - exercise shutdown codepath with fsstress,
9 # make sure we don't BUG/WARN. Coverage for all fs with shutdown.
12 _begin_fstest auto shutdown stress
14 # Import common functions.
17 # Override the default cleanup function.
21 _scratch_unmount 2>/dev/null
25 # real QA test starts here
28 _require_scratch_nocheck
29 _require_scratch_shutdown
30 _require_command "$KILLALL_PROG" killall
32 _scratch_mkfs > $seqres.full 2>&1
35 SLEEP_TIME=$((10 * $TIME_FACTOR))
36 PROCS=$((4 * LOAD_FACTOR))
38 load_dir=$SCRATCH_MNT/test
40 $FSSTRESS_PROG $FSSTRESS_AVOID -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
44 # now shutdown and unmount
47 $KILLALL_PROG -q $FSSTRESS_PROG
50 # for some reason fsstress processes manage to live on beyond the wait?
55 echo "Silence is golden"