lib/: spdx license conversion
[xfstests-dev.git] / tests / generic / 448
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017, Oracle and/or its affiliates.  All Rights Reserved.
4 #
5 # FS QA Test No. 448
6 #
7 # Check what happens when SEEK_HOLE/SEEK_DATA are fed negative offsets.
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         rm -f $tmp.* $BASE_TEST_FILE.*
21 }
22
23 # get standard environment, filters and checks
24 . ./common/rc
25 . ./common/filter
26
27 _supported_fs generic
28 _supported_os Linux
29
30 _require_test
31 _require_seek_data_hole
32
33 BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile_$seq
34
35 _require_test_program "seek_sanity_test"
36
37 $here/src/seek_sanity_test -s 18 -e 18 $BASE_TEST_FILE > $seqres.full 2>&1 ||
38         _fail "seek sanity check failed!"
39
40 _check_dmesg
41 # success, all done
42 echo "Silence is golden"
43 status=0
44 exit