Clean up whitespace problems with 166.
[xfstests-dev.git] / 163
1 #! /bin/sh
2 # FSQA Test No. 163
3 #
4 # File descriptor to handle conversion
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_paths()
27 {
28     $SED_PROG -e "s#$qa_file#QA_FILE#g" \
29         -e "s#$SCRATCH_MNT#SCRATCH_MNT#g"
30 }
31
32 _filter_handles()
33 {
34     $PERL_PROG -ne 's/handle [0-f]+/handle HANDLE/ ; print'
35 }
36
37 # get standard environment, filters and checks
38 . ./common.rc
39 . ./common.filter
40 . ./common.dmapi
41
42 # real QA test starts here
43 _supported_fs xfs
44 _supported_os Linux IRIX
45
46 _require_scratch
47 _scratch_mkfs_xfs >/dev/null 2>&1
48 _dmapi_scratch_mount
49
50
51 qa_file=$SCRATCH_MNT/dmapi_hole_file
52 touch $qa_file
53
54 ${DMAPI_QASUITE1_DIR}cmd/fd_to_handle $SCRATCH_MNT | _filter_paths | _filter_handles
55 ${DMAPI_QASUITE1_DIR}cmd/fd_to_handle $qa_file | _filter_paths | _filter_handles
56
57 status=0
58 exit