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 _begin_fstest auto quota quick
13 # Import common functions.
17 # real QA test starts here
25 repquota -u -g $SCRATCH_MNT | grep -v -E '^root|^$' | _filter_scratch
28 # real QA test starts here
30 _scratch_mkfs >> $seqres.full 2>&1
31 _scratch_mount "-o usrquota,grpquota"
32 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
33 quotaon $SCRATCH_MNT 2>/dev/null
35 touch $SCRATCH_MNT/testfile
36 chown $qa_user:$qa_user $SCRATCH_MNT/testfile
40 # If remount fails with this problem:
42 # https://bugzilla.redhat.com/show_bug.cgi?id=563267
44 # then you need a more recent mount binary.
45 _try_scratch_mount "-o remount,ro" 2>&1 | tee -a $seqres.full | _filter_scratch
46 touch $SCRATCH_MNT/failed 2>&1 | tee -a $seqres.full | _filter_scratch
47 _try_scratch_mount "-o remount,rw" 2>&1 | tee -a $seqres.full | _filter_scratch
49 touch $SCRATCH_MNT/testfile2
50 chown $qa_user:$qa_user $SCRATCH_MNT/testfile2
54 _scratch_unmount 2>/dev/null