}
s/^('$name'\s+[-|+][-|+]\s+)(\d+)/\1 OK/g;
}
- ' | _filter_repquota
+ ' | _filter_repquota $1
}
# real QA test starts here
echo
echo "*** report no quota settings" | tee -a $seq.full
-repquota -$type $SCRATCH_DEV | _filter_repquota
+repquota -$type $SCRATCH_DEV | _filter_repquota 6
echo
echo "*** report initial settings" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/initme $id $type 1024 0
setquota -$type $id $blksoft $blkhard $inosoft $inohard $SCRATCH_DEV
-repquota -$type $SCRATCH_DEV | _filter_repquota
+repquota -$type $SCRATCH_DEV | _filter_repquota 7
echo
echo "*** push past the soft inode limit" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/softie1 $id $type 1024 0
_file_as_id $SCRATCH_MNT/softie2 $id $type 1024 0
_qmount
-repquota -$type $SCRATCH_DEV | _filter_repquota
+repquota -$type $SCRATCH_DEV | _filter_repquota 7
echo
echo "*** push past the soft block limit" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/softie $id $type 1024 140
_qmount
-repquota -$type $SCRATCH_DEV | _filter_repquota
+repquota -$type $SCRATCH_DEV | _filter_repquota 7
echo
echo "*** push past the hard inode limit (expect EDQUOT)" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
done
_qmount
-repquota -$type $SCRATCH_DEV | _filter_repquota
+repquota -$type $SCRATCH_DEV | _filter_repquota 7
echo
echo "*** push past the hard block limit (expect EDQUOT)" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/softie $id $type 1024 540
_qmount
-repquota -$type $SCRATCH_DEV | _filter_and_check_blocks
+repquota -$type $SCRATCH_DEV | _filter_and_check_blocks 7
# success, all done
status=0
----------------------------------------------------------------------
[NAME] -- 0 0 0 3 0 0
-
-
*** report initial settings
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] -- 0 100 500 1 4 10
-
-
*** push past the soft inode limit
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] -- 0 100 500 3 4 10
-
-
*** push past the soft block limit
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] +- 140 100 500 4 4 10
-
-
*** push past the hard inode limit (expect EDQUOT)
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 4 0 0 3 0 0
[NAME] ++ 140 100 500 16 4 10
-
-
*** push past the hard block limit (expect EDQUOT)
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 4 0 0 3 0 0
[NAME] ++ 540 100 500 16 4 10
-
-
*** unmount
----------------------------------------------------------------------
[NAME] -- 0 0 0 3 0 0
-
-
*** report initial settings
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] -- 0 100 500 1 4 10
-
-
*** push past the soft inode limit
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] -- 0 100 500 3 4 10
-
-
*** push past the soft block limit
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] +- 140 100 500 7days 4 4 10 7days
-
-
*** push past the hard inode limit (expect EDQUOT)
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] ++ 140 100 500 7days 10 4 10 7days
-
-
*** push past the hard block limit (expect EDQUOT)
*** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] ++ OK 100 500 7days 10 4 10 7days
-
-
*** unmount
----------------------------------------------------------------------
[NAME] -- 0 0 0 3 0 0
-
-
*** report initial settings
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] -- 0 100 500 1 4 10
-
-
*** push past the soft inode limit
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] -- 0 100 500 3 4 10
-
-
*** push past the soft block limit
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] +- 140 100 500 4 4 10
-
-
*** push past the hard inode limit (expect EDQUOT)
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 4 0 0 3 0 0
[NAME] ++ 140 100 500 16 4 10
-
-
*** push past the hard block limit (expect EDQUOT)
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 4 0 0 3 0 0
[NAME] ++ 540 100 500 16 4 10
-
-
*** unmount
----------------------------------------------------------------------
[NAME] -- 0 0 0 3 0 0
-
-
*** report initial settings
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] -- 0 100 500 1 4 10
-
-
*** push past the soft inode limit
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] -- 0 100 500 3 4 10
-
-
*** push past the soft block limit
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] +- 140 100 500 7days 4 4 10 7days
-
-
*** push past the hard inode limit (expect EDQUOT)
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] ++ 140 100 500 7days 10 4 10 7days
-
-
*** push past the hard block limit (expect EDQUOT)
*** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days
[NAME] -- 0 0 0 3 0 0
[NAME] ++ OK 100 500 7days 10 4 10 7days
-
-
*** unmount
_filter_repquota()
{
- perl -ne "
+ head -$1 | perl -ne "
s/^(\w+)\s+([-|+])/[NAME] \2/g;
s,$SCRATCH_DEV,[DEVICE],g;
print"