fix number of arguments to AC_DEFINE
[xfstests-dev.git] / 175
1 #! /bin/sh
2 # FSQA Test No. 175
3 #
4 # Hole punching with extsize hints, holes may not reported by xfs_bmap.
5 # This is not good for certain backup apps, as they rely on the hole
6 # being visible in the file so later on they know where to migrate
7 # back the data from the tape.
8 #
9 #-----------------------------------------------------------------------
10 #  Copyright (c) 2007 Silicon Graphics, Inc.  All Rights Reserved.
11 #-----------------------------------------------------------------------
12 #
13 owner=ddiss@sgi.com
14
15 seq=`basename $0`
16 echo "QA output created by $seq"
17
18 here=`pwd`
19 tmp=/tmp/$$
20 rm -f $seq.full
21 status=1    # failure is the default!
22 trap "_cleanup; exit \$status" 0 1 2 3 15
23
24 _cleanup()
25 {
26         rm -f $tmp/*
27 }
28
29 # get standard environment, filters and checks
30 . ./common.rc
31 . ./common.filter
32 . ./common.dmapi
33 . ./common.punch
34
35 # real QA test starts here
36 _supported_fs xfs
37 _supported_os Linux
38
39 _require_scratch
40
41 # test that we have DMAPI support
42 _dmapi_scratch_mount
43 umount $SCRATCH_MNT > /dev/null 2>&1
44
45 # _test_punch args: blksize extsize_hint filesize "pp1 pp2 pp3" \
46 #                                       "ps1 ps2 ps3" "pt1 pt2 pt3" "wp1 wp2" "ws1 ws2" \
47 #                                       "w p p w p" resvsp
48
49 echo "-- test dmpunch-hole without an extent size hint --"
50 _test_punch 4096 0 256 "240" "16" "d" "0" "256" "w p" noresv
51
52 echo
53 echo "-- this time use a 4k (one block) extent size hint --"
54 _test_punch 4096 1 256 "240" "16" "d" "0" "256" "w p" noresv
55
56 status=0
57 exit