overlay: run unionmount testsuite test cases
[xfstests-dev.git] / tests / xfs / 116
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 116
6 #
7 # pv#940491
8 # Test out resetting of sb_qflags when mounting with no quotas after
9 # having mounted with quotas.
10 #
11 seq=`basename $0`
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
14
15 here=`pwd`
16 tmp=/tmp/$$
17 status=1        # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
19
20 _cleanup()
21 {
22     cd /
23     rm -f $tmp.*
24 }
25
26 # get standard environment, filters and checks
27 . ./common/rc
28 . ./common/filter
29 . ./common/quota
30
31 # real QA test starts here
32
33 _supported_fs xfs
34 _supported_os Linux
35
36 _require_scratch
37 _require_xfs_quota
38
39 # Only mount with the quota options we specify below
40 _qmount_option "defaults"
41
42 _scratch_mkfs >/dev/null 2>&1
43 _scratch_mount "-o uquota"
44 _scratch_unmount
45 _scratch_xfs_db -r -c sb -c print  | grep qflags
46 _scratch_mount
47 _scratch_unmount
48 _scratch_xfs_db -r -c sb -c print  | grep qflags
49
50 # success, all done
51 status=0
52 exit