generic: test for file loss after mix of rename, fsync and inode eviction
[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 . ./common/preamble
11 _begin_fstest auto rw
12
13 # Override the default cleanup function.
14 _cleanup()
15 {
16         cd /
17         rm -f $tmp.*
18         $KILLALL_PROG -9 fsstress > /dev/null 2>&1
19 }
20
21 # Import common functions.
22
23 # Modify as appropriate.
24 _supported_fs generic
25
26 _require_scratch
27 _require_command "$KILLALL_PROG" "killall"
28
29 echo "Silence is golden."
30
31 _scratch_mkfs > $seqres.full 2>&1
32 _scratch_mount >> $seqres.full 2>&1
33
34 nr_cpus=$((LOAD_FACTOR * 4))
35 nr_ops=$((25000 * nr_cpus * TIME_FACTOR))
36 $FSSTRESS_PROG $FSSTRESS_AVOID -w -d $SCRATCH_MNT -n $nr_ops -p $nr_cpus >> $seqres.full
37
38 # success, all done
39 status=0
40 exit