2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2010 Jan Kara. All Rights Reserved.
4 # Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved.
8 # Test whether quota gets properly reenabled after remount read-write
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
19 # get standard environment, filters and checks
24 # real QA test starts here
33 repquota -u -g $SCRATCH_MNT | grep -v -E '^root|^$' | _filter_scratch
36 # real QA test starts here
39 _scratch_mkfs >> $seqres.full 2>&1
40 _scratch_mount "-o usrquota,grpquota"
41 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
42 quotaon $SCRATCH_MNT 2>/dev/null
44 touch $SCRATCH_MNT/testfile
45 chown $qa_user:$qa_user $SCRATCH_MNT/testfile
49 # If remount fails with this problem:
51 # https://bugzilla.redhat.com/show_bug.cgi?id=563267
53 # then you need a more recent mount binary.
54 _try_scratch_mount "-o remount,ro" 2>&1 | tee -a $seqres.full | _filter_scratch
55 touch $SCRATCH_MNT/failed 2>&1 | tee -a $seqres.full | _filter_scratch
56 _try_scratch_mount "-o remount,rw" 2>&1 | tee -a $seqres.full | _filter_scratch
58 touch $SCRATCH_MNT/testfile2
59 chown $qa_user:$qa_user $SCRATCH_MNT/testfile2
63 _scratch_unmount 2>/dev/null