From: Nathan Straz Date: Tue, 20 May 2003 23:51:40 +0000 (+0000) Subject: Add some code to limit the repquota output to just the local entries and not X-Git-Tag: v1.1.0~984 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0cac704bdf4e8852f141b3c2bd9ad70737e94f4a;p=users%2Fhch%2Fxfstests-dev.git Add some code to limit the repquota output to just the local entries and not the evil NIS entries. This allows me to run the tests in Eagan with NIS enabled. Add a parameter to _filter_and_check_blocks and pass it to _filter_repquota. Use the new parameter to _filter_repquota. --- diff --git a/050 b/050 index 7f1ee5c73..ad2a59a5c 100755 --- a/050 +++ b/050 @@ -90,7 +90,7 @@ _filter_and_check_blocks() } s/^('$name'\s+[-|+][-|+]\s+)(\d+)/\1 OK/g; } - ' | _filter_repquota + ' | _filter_repquota $1 } # real QA test starts here @@ -127,26 +127,26 @@ echo "and using type=$type id=$id" >>$seq.full 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 @@ -155,13 +155,13 @@ do _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 diff --git a/050.gqnoenforce b/050.gqnoenforce index 137aa0465..ff1c417e2 100644 --- a/050.gqnoenforce +++ b/050.gqnoenforce @@ -14,8 +14,6 @@ Group used soft hard grace used soft hard grace ---------------------------------------------------------------------- [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 @@ -25,8 +23,6 @@ Group used soft hard grace used soft hard grace [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 @@ -36,8 +32,6 @@ Group used soft hard grace used soft hard grace [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 @@ -47,8 +41,6 @@ Group used soft hard grace used soft hard grace [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 @@ -58,8 +50,6 @@ Group used soft hard grace used soft hard grace [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 @@ -69,6 +59,4 @@ Group used soft hard grace used soft hard grace [NAME] -- 4 0 0 3 0 0 [NAME] ++ 540 100 500 16 4 10 - - *** unmount diff --git a/050.grpquota b/050.grpquota index 742c03b4c..68a761d1d 100644 --- a/050.grpquota +++ b/050.grpquota @@ -14,8 +14,6 @@ Group used soft hard grace used soft hard grace ---------------------------------------------------------------------- [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 @@ -25,8 +23,6 @@ Group used soft hard grace used soft hard grace [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 @@ -36,8 +32,6 @@ Group used soft hard grace used soft hard grace [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 @@ -47,8 +41,6 @@ Group used soft hard grace used soft hard grace [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 @@ -58,8 +50,6 @@ Group used soft hard grace used soft hard grace [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 @@ -69,6 +59,4 @@ Group used soft hard grace used soft hard grace [NAME] -- 0 0 0 3 0 0 [NAME] ++ OK 100 500 7days 10 4 10 7days - - *** unmount diff --git a/050.uqnoenforce b/050.uqnoenforce index 0febbbca9..619e3dd55 100644 --- a/050.uqnoenforce +++ b/050.uqnoenforce @@ -14,8 +14,6 @@ User used soft hard grace used soft hard grace ---------------------------------------------------------------------- [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 @@ -25,8 +23,6 @@ User used soft hard grace used soft hard grace [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 @@ -36,8 +32,6 @@ User used soft hard grace used soft hard grace [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 @@ -47,8 +41,6 @@ User used soft hard grace used soft hard grace [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 @@ -58,8 +50,6 @@ User used soft hard grace used soft hard grace [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 @@ -69,6 +59,4 @@ User used soft hard grace used soft hard grace [NAME] -- 4 0 0 3 0 0 [NAME] ++ 540 100 500 16 4 10 - - *** unmount diff --git a/050.usrquota b/050.usrquota index c673c9744..25d920801 100644 --- a/050.usrquota +++ b/050.usrquota @@ -14,8 +14,6 @@ User used soft hard grace used soft hard grace ---------------------------------------------------------------------- [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 @@ -25,8 +23,6 @@ User used soft hard grace used soft hard grace [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 @@ -36,8 +32,6 @@ User used soft hard grace used soft hard grace [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 @@ -47,8 +41,6 @@ User used soft hard grace used soft hard grace [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 @@ -58,8 +50,6 @@ User used soft hard grace used soft hard grace [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 @@ -69,6 +59,4 @@ User used soft hard grace used soft hard grace [NAME] -- 0 0 0 3 0 0 [NAME] ++ OK 100 500 7days 10 4 10 7days - - *** unmount diff --git a/common.quota b/common.quota index a42735c29..822672f7b 100644 --- a/common.quota +++ b/common.quota @@ -88,7 +88,7 @@ _choose_gid() _filter_repquota() { - perl -ne " + head -$1 | perl -ne " s/^(\w+)\s+([-|+])/[NAME] \2/g; s,$SCRATCH_DEV,[DEVICE],g; print"