generic: test deadlock on O_DIRECT|O_DSYNC
[xfstests-dev.git] / tests / generic / 539
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2019, CTERA Networks.  All Rights Reserved.
4 #
5 # FS QA Test No. 539
6 #
7 # Check that SEEK_HOLE can find a punched hole.
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 # get standard environment, filters and checks
19 . ./common/rc
20
21 _supported_fs generic
22 _supported_os Linux
23
24 _require_test
25 _require_seek_data_hole
26 _require_xfs_io_command "fpunch"
27
28 base_test_file=$TEST_DIR/seek_sanity_testfile.$seq
29
30 _require_test_program "seek_sanity_test"
31
32 _cleanup()
33 {
34         cd /
35         rm -f $tmp.*
36         rm -f $base_test_file*
37 }
38
39 echo "Silence is golden"
40
41 _run_seek_sanity_test -s 21 -e 21 $base_test_file > $seqres.full 2>&1 ||
42         _fail "seek sanity check failed!"
43
44 # success, all done
45 status=0
46 exit