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
32 repquota -u -g $SCRATCH_MNT | grep -v -E '^root|^$' | _filter_scratch
35 # real QA test starts here
38 _scratch_mkfs >> $seqres.full 2>&1
39 _scratch_mount "-o usrquota,grpquota"
40 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
41 quotaon $SCRATCH_MNT 2>/dev/null
43 touch $SCRATCH_MNT/testfile
44 chown $qa_user:$qa_user $SCRATCH_MNT/testfile
48 # If remount fails with this problem:
50 # https://bugzilla.redhat.com/show_bug.cgi?id=563267
52 # then you need a more recent mount binary.
53 _try_scratch_mount "-o remount,ro" 2>&1 | tee -a $seqres.full | _filter_scratch
54 touch $SCRATCH_MNT/failed 2>&1 | tee -a $seqres.full | _filter_scratch
55 _try_scratch_mount "-o remount,rw" 2>&1 | tee -a $seqres.full | _filter_scratch
57 touch $SCRATCH_MNT/testfile2
58 chown $qa_user:$qa_user $SCRATCH_MNT/testfile2
62 _scratch_unmount 2>/dev/null