f92f6a3ef4852650ec11e68e41a9ba0b126b0067
[xfstests-dev.git] / 152
1 #! /bin/sh
2 # FSQA Test No. 152
3 #
4 # Verify DMAPI functions
5 #
6 #-----------------------------------------------------------------------
7 #  Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=allanr@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1    # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     _cleanup_testdir
24 }
25
26 _filter_handles()
27 {
28     $PERL_PROG -ne "s/[0-9|a-f]+\s+\(dm/DMAPI_HANDLE \(dm/g ; print" |
29         $PERL_PROG -ne "s/hash [0-9]+/hash HASH/g; print"
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 DMAPI_FS_HANDLE="`${DMAPI_QASUITE1_DIR}cmd/path_to_fshandle $SCRATCH_MNT`"
46
47 ${DMAPI_QASUITE1_DIR}cmd/dm_handle $SCRATCH_MNT | _filter_handles
48
49 status=0
50 exit