xfs: convert tests to SPDX license tags
[xfstests-dev.git] / tests / xfs / 081
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 081
6 #
7 # To test out logprint with quotas
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1        # failure is the default!
16
17 # get standard environment, filters and checks
18 . ./common/rc
19 . ./common/filter
20 . ./common/log
21 . ./common/quota
22
23 # real QA test starts here
24 _supported_fs xfs
25 _supported_os Linux
26
27 _cleanup()
28 {
29     cd /
30     _cleanup_logfiles
31     rm -f $tmp.*
32     echo "*** unmount"
33     _scratch_unmount 2>/dev/null
34 }
35 trap "_cleanup; exit \$status" 0 1 2 3 15
36
37 # prelim
38 rm -f $seqres.full $tmp.*
39 _require_scratch
40 _require_xfs_quota
41 _require_v2log
42  
43 echo "*** init FS"
44 _scratch_unmount >/dev/null 2>&1
45
46 # do a simple quota test to ensure DQUOT data is happening
47 export MOUNT_OPTIONS="-o quota,gquota"
48
49 # mount with quotas?
50 _scratch_mkfs_xfs "-l version=1" 1>/dev/null 2>&1
51 _qmount
52 src/feature -u $SCRATCH_DEV || _notrun "No quota support at mount time"
53 _scratch_unmount
54
55 _mkfs_log "-l version=1"
56 _create_log
57 _check_log
58 _print_transaction_inode 2
59 _cmp_output $seq.ugquota.trans_inode $filtered
60
61 # got thru it all so we may have success
62 status=0
63 exit