generic/223: make sure all files get created on the data device
[xfstests-dev.git] / tests / generic / 476
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Oracle, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 476
6 #
7 # Run an all-writes fsstress run with multiple threads to shake out
8 # bugs in the write path.
9 #
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
15 tmp=/tmp/$$
16 status=1        # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
18
19 _cleanup()
20 {
21         cd /
22         rm -f $tmp.*
23         $KILLALL_PROG -9 fsstress > /dev/null 2>&1
24 }
25
26 # get standard environment, filters and checks
27 . ./common/rc
28
29 # Modify as appropriate.
30 _supported_fs generic
31
32 _require_scratch
33 _require_command "$KILLALL_PROG" "killall"
34
35 rm -f $seqres.full
36
37 echo "Silence is golden."
38
39 _scratch_mkfs > $seqres.full 2>&1
40 _scratch_mount >> $seqres.full 2>&1
41
42 nr_cpus=$((LOAD_FACTOR * 4))
43 nr_ops=$((25000 * nr_cpus * TIME_FACTOR))
44 $FSSTRESS_PROG $FSSTRESS_AVOID -w -d $SCRATCH_MNT -n $nr_ops -p $nr_cpus >> $seqres.full
45
46 # success, all done
47 status=0
48 exit