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 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
19 # get standard environment, filters and checks
26 _scratch_unmount 2>/dev/null
29 trap "_cleanup; exit \$status" 0 1 2 3 15
31 # real QA test starts here
35 _require_scratch_nocheck
36 _require_scratch_shutdown
37 _require_command "$KILLALL_PROG" killall
41 _scratch_mkfs > $seqres.full 2>&1
44 SLEEP_TIME=$((10 * $TIME_FACTOR))
45 PROCS=$((4 * LOAD_FACTOR))
47 load_dir=$SCRATCH_MNT/test
49 $FSSTRESS_PROG $FSSTRESS_AVOID -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
53 # now shutdown and unmount
56 $KILLALL_PROG -q $FSSTRESS_PROG
59 # for some reason fsstress processes manage to live on beyond the wait?
64 echo "Silence is golden"