modify galah machine configuration.
[xfstests-dev.git] / 161
1 #! /bin/sh
2 # FSQA Test No. 161
3 #
4 # DMAPI function punch hole. Create 3Mb file and punch a hole from
5 # offset 1Mb to EOF
6 #
7 #-----------------------------------------------------------------------
8 #  Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
9 #-----------------------------------------------------------------------
10 #
11 # creator
12 owner=allanr@sgi.com
13
14 seq=`basename $0`
15 echo "QA output created by $seq"
16
17 here=`pwd`
18 tmp=/tmp/$$
19 status=1    # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
21
22 _cleanup()
23 {
24     _cleanup_testdir
25 }
26
27 _filter_qa_file()
28 {
29     sed -e "s#$qa_file#QA_FILE#"
30 }
31
32 # get standard environment, filters and checks
33 . ./common.rc
34 . ./common.filter
35 . ./common.dmapi
36
37 # real QA test starts here
38 _supported_fs xfs
39 _supported_os Linux IRIX
40
41 _require_scratch
42 _scratch_mkfs_xfs >/dev/null 2>&1
43 _dmapi_scratch_mount
44
45 qa_file=$SCRATCH_MNT/dmapi_hole_file
46
47 dd if=/dev/zero bs=1024k count=3 of=$qa_file
48
49 ${DMAPI_QASUITE1_DIR}cmd/get_allocinfo $qa_file | _filter_qa_file
50 ${DMAPI_QASUITE1_DIR}cmd/probe_hole -o 1048576 -l 0 $qa_file
51 ${DMAPI_QASUITE1_DIR}cmd/get_allocinfo $qa_file | _filter_qa_file
52
53 status=0
54 exit