common/fuzzy: try to clear blocking flags first in _scratch_fuzz_modify
[xfstests-dev.git] / tests / generic / 345
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. 345
6 #
7 # Test races between mmap from racing processes with and without prefaulting.
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1        # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20         cd /
21         rm -f $tmp.*
22 }
23
24 # get standard environment and checks
25 . ./common/rc
26
27 # real QA test starts here
28 _supported_fs generic
29 _supported_os Linux
30 _require_scratch
31 _require_test_program "holetest"
32
33 rm -f $seqres.full
34
35 _scratch_mkfs >>$seqres.full 2>&1
36 _scratch_mount
37
38 $here/src/holetest -f -F $SCRATCH_MNT/testfile 16
39 $here/src/holetest -f -F $SCRATCH_MNT/testfile 256
40 $here/src/holetest -f -F -r $SCRATCH_MNT/testfile 16
41 $here/src/holetest -f -F -r $SCRATCH_MNT/testfile 256
42
43 status=0
44 exit