xfs/530: skip test if user MKFS_OPTIONS screw up formatting
[xfstests-dev.git] / tests / xfs / 304
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Oracle, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 304
6 #
7 # Test to verify that turn group/project quotas off while user quotas
8 # are left on.
9 #
10 . ./common/preamble
11 _begin_fstest auto quick quota
12
13 # Import common functions.
14 . ./common/filter
15 . ./common/quota
16
17 # Modify as appropriate.
18 _supported_fs xfs
19
20 _require_scratch
21 _require_xfs_quota
22 _require_xfs_mkfs_crc
23 _require_xfs_crc
24
25 _scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
26
27 _qmount_option "uquota,gquota,pquota"
28 _qmount
29
30 QUOTA_DIR=$SCRATCH_MNT/quota_dir
31
32 mkdir -p $QUOTA_DIR
33 echo "*** turn off group quotas"
34 $XFS_QUOTA_PROG -x -c 'disable -g' $SCRATCH_MNT
35 rmdir $QUOTA_DIR
36 echo "*** umount"
37 _scratch_unmount
38
39 _qmount
40 mkdir -p $QUOTA_DIR
41 echo "*** turn off project quotas"
42 $XFS_QUOTA_PROG -x -c 'disable -p' $SCRATCH_MNT
43 rmdir $QUOTA_DIR
44 echo "*** umount"
45 _scratch_unmount
46
47 _qmount
48 mkdir -p $QUOTA_DIR
49 echo "*** turn off group/project quotas"
50 $XFS_QUOTA_PROG -x -c 'disable -gp' $SCRATCH_MNT
51 rmdir $QUOTA_DIR
52 echo "*** umount"
53 _scratch_unmount
54
55 # success, all done
56 status=0
57 exit