xfstests: Clean up build output
[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 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License as
14 # published by the Free Software Foundation.
15 #
16 # This program is distributed in the hope that it would be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write the Free Software Foundation,
23 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
24 #
25 #-----------------------------------------------------------------------
26 #
27 owner=ddiss@sgi.com
28
29 seq=`basename $0`
30 echo "QA output created by $seq"
31
32 here=`pwd`
33 tmp=/tmp/$$
34 rm -f $seq.full
35 status=1    # failure is the default!
36 trap "_cleanup; exit \$status" 0 1 2 3 15
37
38 _cleanup()
39 {
40         rm -f $tmp/*
41 }
42
43 # get standard environment, filters and checks
44 . ./common.rc
45 . ./common.filter
46 . ./common.dmapi
47 . ./common.punch
48
49 # real QA test starts here
50 _supported_fs xfs
51 _supported_os Linux
52
53 _require_scratch
54
55 # test that we have DMAPI support
56 _dmapi_scratch_mount
57 umount $SCRATCH_MNT > /dev/null 2>&1
58
59 # _test_punch args: blksize extsize_hint filesize "pp1 pp2 pp3" \
60 #                                       "ps1 ps2 ps3" "pt1 pt2 pt3" "wp1 wp2" "ws1 ws2" \
61 #                                       "w p p w p" resvsp
62
63 echo "-- test dmpunch-hole without an extent size hint --"
64 _test_punch 4096 0 256 "240" "16" "d" "0" "256" "w p" noresv
65
66 echo
67 echo "-- this time use a 4k (one block) extent size hint --"
68 _test_punch 4096 1 256 "240" "16" "d" "0" "256" "w p" noresv
69
70 status=0
71 exit