common/fuzzy: try to clear blocking flags first in _scratch_fuzz_modify
[xfstests-dev.git] / tests / generic / 340
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2016 SUSE Linux Products GmbH. All Rights Reserved.
4 #
5 # FSQA Test No. 340
6 #
7 # Test mmap writing races from racing threads
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12 tmp=/tmp/$$
13 status=1        # failure is the default!
14 trap "_cleanup; exit \$status" 0 1 2 3 15
15
16 _cleanup()
17 {
18         cd /
19         rm -f $tmp.*
20 }
21
22 # get standard environment and checks
23 . ./common/rc
24
25 # real QA test starts here
26 _supported_fs generic
27 _supported_os Linux
28 _require_scratch
29 _require_test_program "holetest"
30
31 rm -f $seqres.full
32
33 _scratch_mkfs >>$seqres.full 2>&1
34 _scratch_mount
35
36 $here/src/holetest -f $SCRATCH_MNT/testfile 1
37 $here/src/holetest -f $SCRATCH_MNT/testfile 16
38 $here/src/holetest -f $SCRATCH_MNT/testfile 256
39
40 status=0
41 exit