fsx/fsstress: round blocksize properly
[xfstests-dev.git] / tests / generic / 344
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. 344
6 #
7 # Test races between mmap from racing threads when pages are prefaulted,
8 # Test races between mmap and buffered writes when pages are prefaulted.
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 }
24
25 # get standard environment and checks
26 . ./common/rc
27
28 # real QA test starts here
29 _supported_fs generic
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 -r $SCRATCH_MNT/testfile 16
39 $here/src/holetest -f -r $SCRATCH_MNT/testfile 256
40 $here/src/holetest -f -r -w $SCRATCH_MNT/testfile 16
41 $here/src/holetest -f -r -w $SCRATCH_MNT/testfile 256
42
43 status=0
44 exit