4 # Test quota off handling.
6 # Based on bug reports from Utako Kusaka <u-kusaka@wm.jp.nec.com> and
7 # Ryota Yamauchi <r-yamauchi@vf.jp.nec.com>.
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2009 Christoph Hellwig. All Rights Reserved.
12 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License as
14 # published by the Free Software Foundation.
16 # This program is distributed in the hope that it would be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write the Free Software Foundation,
23 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #-----------------------------------------------------------------------
29 seqres=$RESULT_DIR/$seq
30 echo "QA output created by $seq"
34 status=1 # failure is the default!
39 _scratch_unmount >/dev/null 2>&1
41 trap "_cleanup; exit \$status" 0 1 2 3 15
43 # get standard environment, filters and checks
48 # real QA test starts here
55 echo "Silence is golden."
57 # create scratch filesystem
58 _scratch_mkfs_xfs >/dev/null 2>&1
60 # mount with quotas enabled
61 _scratch_mount -o uquota
64 xfs_quota -x -c off $SCRATCH_DEV
66 # and unmount (this used to crash)
69 # create scratch filesystem
70 _scratch_mkfs_xfs >/dev/null 2>&1
72 # mount with quotas enabled
73 _scratch_mount -o uquota
75 # turn off quota and remove space allocated to the quota files
76 # (this used to give wrong ENOSYS returns in 2.6.31)
77 xfs_quota -x -c off -c remove $SCRATCH_DEV