generic/077: fall back to /usr if /lib/modules doesn't exist
[xfstests-dev.git] / tests / xfs / 290
1 #! /bin/bash
2 # FS QA Test No. 290
3 #
4 # Makes calls to XFS_IOC_ZERO_RANGE and checks tossed ranges
5 #
6 # Nothing should be tossed unless the range includes a page boundry
7 #
8 # Primarily tests page boundries and boundries that are
9 #  off-by-one to ensure we're only tossing what's expected
10 #
11 #-----------------------------------------------------------------------
12 # Copyright (c) 2012 SGI.  All Rights Reserved.
13 #
14 # This program is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU General Public License as
16 # published by the Free Software Foundation.
17 #
18 # This program is distributed in the hope that it would be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 # GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write the Free Software Foundation,
25 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
26 #-----------------------------------------------------------------------
27 #
28
29 seq=`basename $0`
30 seqres=$RESULT_DIR/$seq
31 echo "QA output created by $seq"
32
33 here=`pwd`
34 tmp=/tmp/$$
35 status=1        # failure is the default!
36 trap "exit \$status" 0 1 2 3 15
37
38 # get standard environment, filters and checks
39 . ./common/rc
40 . ./common/filter
41 . ./common/punch
42
43 # real QA test starts here
44
45 # Modify as appropriate.
46 _supported_fs xfs
47 _supported_os Linux
48
49 _require_test
50 _require_xfs_io_command "zero"
51
52 testfile=$TEST_DIR/290.$$
53
54 _test_block_boundaries 4096 zero _filter_xfs_io_unique $testfile
55
56 # success, all done
57 status=0
58 exit