Clean up whitespace problems with 166.
[xfstests-dev.git] / 081
1 #! /bin/sh
2 # FS QA Test No. 081
3 #
4 # To test out logprint with quotas
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=tes@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
20 # get standard environment, filters and checks
21 . ./common.rc
22 . ./common.filter
23 . ./common.log
24 . ./common.quota
25
26 # real QA test starts here
27 _supported_fs xfs
28 _supported_os IRIX Linux
29
30 _cleanup()
31 {
32     cd /
33     _cleanup_logfiles
34     rm -f $tmp.*
35     echo "*** unmount"
36     umount $SCRATCH_MNT 2>/dev/null
37 }
38 trap "_cleanup; exit \$status" 0 1 2 3 15
39
40 # prelim
41 rm -f $seq.full $tmp.*
42 _require_scratch
43 _require_quota
44 _require_v2log
45  
46 echo "*** init FS"
47 umount $SCRATCH_DEV >/dev/null 2>&1
48
49
50 # do a simple quota test to ensure DQUOT data is happening
51 export MKFS_OPTIONS="-l version=1"
52 export MOUNT_OPTIONS="-o quota,gquota"
53
54 if [ "$HOSTOS" = "IRIX" ]; then 
55     start=0
56 else
57     start=2
58 fi
59
60 # mount with quotas?
61 _scratch_mkfs_xfs 1>/dev/null 2>&1
62 _qmount
63 src/feature -u $SCRATCH_DEV || _notrun "No quota support at mount time"
64 umount $SCRATCH_MNT
65
66 _mkfs_log
67 _create_log
68 _check_log
69 _print_transaction_inode $start
70 _cmp_output $seq.ugquota.trans_inode $filtered
71
72 # got thru it all so we may have success
73 status=0
74 exit