fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 461
1 #!/bin/bash
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.
5 #
6 # FS QA Test No. 461
7 #
8 # Shutdown stress test - exercise shutdown codepath with fsstress,
9 # make sure we don't BUG/WARN. Coverage for all fs with shutdown.
10 #
11 . ./common/preamble
12 _begin_fstest auto shutdown stress
13
14 # Import common functions.
15 . ./common/filter
16
17 # Override the default cleanup function.
18 _cleanup()
19 {
20         cd /
21         _scratch_unmount 2>/dev/null
22         rm -f $tmp.*
23 }
24
25 # real QA test starts here
26 _supported_fs generic
27
28 _require_scratch_nocheck
29 _require_scratch_shutdown
30 _require_command "$KILLALL_PROG" killall
31
32 _scratch_mkfs > $seqres.full 2>&1
33 _scratch_mount
34
35 SLEEP_TIME=$((10 * $TIME_FACTOR))
36 PROCS=$((4 * LOAD_FACTOR))
37
38 load_dir=$SCRATCH_MNT/test
39
40 $FSSTRESS_PROG $FSSTRESS_AVOID -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
41 sleep $SLEEP_TIME
42 sync
43
44 # now shutdown and unmount
45 sleep 5
46 _scratch_shutdown
47 $KILLALL_PROG -q $FSSTRESS_PROG
48 wait
49
50 # for some reason fsstress processes manage to live on beyond the wait?
51 sleep 5
52
53 _scratch_unmount
54
55 echo "Silence is golden"
56
57 status=0
58 exit