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.
This commit is contained in:
Nathan Straz
2003-05-20 23:51:40 +00:00
parent d4a70b1114
commit 0cac704bdf
6 changed files with 8 additions and 56 deletions
+7 -7
View File
@@ -90,7 +90,7 @@ _filter_and_check_blocks()
} }
s/^('$name'\s+[-|+][-|+]\s+)(\d+)/\1 OK/g; s/^('$name'\s+[-|+][-|+]\s+)(\d+)/\1 OK/g;
} }
' | _filter_repquota ' | _filter_repquota $1
} }
# real QA test starts here # real QA test starts here
@@ -127,26 +127,26 @@ echo "and using type=$type id=$id" >>$seq.full
echo echo
echo "*** report no quota settings" | tee -a $seq.full echo "*** report no quota settings" | tee -a $seq.full
repquota -$type $SCRATCH_DEV | _filter_repquota repquota -$type $SCRATCH_DEV | _filter_repquota 6
echo echo
echo "*** report initial settings" | tee -a $seq.full echo "*** report initial settings" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/initme $id $type 1024 0 _file_as_id $SCRATCH_MNT/initme $id $type 1024 0
setquota -$type $id $blksoft $blkhard $inosoft $inohard $SCRATCH_DEV setquota -$type $id $blksoft $blkhard $inosoft $inohard $SCRATCH_DEV
repquota -$type $SCRATCH_DEV | _filter_repquota repquota -$type $SCRATCH_DEV | _filter_repquota 7
echo echo
echo "*** push past the soft inode limit" | tee -a $seq.full 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/softie1 $id $type 1024 0
_file_as_id $SCRATCH_MNT/softie2 $id $type 1024 0 _file_as_id $SCRATCH_MNT/softie2 $id $type 1024 0
_qmount _qmount
repquota -$type $SCRATCH_DEV | _filter_repquota repquota -$type $SCRATCH_DEV | _filter_repquota 7
echo echo
echo "*** push past the soft block limit" | tee -a $seq.full echo "*** push past the soft block limit" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/softie $id $type 1024 140 _file_as_id $SCRATCH_MNT/softie $id $type 1024 140
_qmount _qmount
repquota -$type $SCRATCH_DEV | _filter_repquota repquota -$type $SCRATCH_DEV | _filter_repquota 7
echo echo
echo "*** push past the hard inode limit (expect EDQUOT)" | tee -a $seq.full 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 _file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
done done
_qmount _qmount
repquota -$type $SCRATCH_DEV | _filter_repquota repquota -$type $SCRATCH_DEV | _filter_repquota 7
echo echo
echo "*** push past the hard block limit (expect EDQUOT)" | tee -a $seq.full echo "*** push past the hard block limit (expect EDQUOT)" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/softie $id $type 1024 540 _file_as_id $SCRATCH_MNT/softie $id $type 1024 540
_qmount _qmount
repquota -$type $SCRATCH_DEV | _filter_and_check_blocks repquota -$type $SCRATCH_DEV | _filter_and_check_blocks 7
# success, all done # success, all done
status=0 status=0
-12
View File
@@ -14,8 +14,6 @@ Group used soft hard grace used soft hard grace
---------------------------------------------------------------------- ----------------------------------------------------------------------
[NAME] -- 0 0 0 3 0 0 [NAME] -- 0 0 0 3 0 0
*** report initial settings *** report initial settings
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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 0 0 3 0 0
[NAME] -- 0 100 500 1 4 10 [NAME] -- 0 100 500 1 4 10
*** push past the soft inode limit *** push past the soft inode limit
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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 0 0 3 0 0
[NAME] -- 0 100 500 3 4 10 [NAME] -- 0 100 500 3 4 10
*** push past the soft block limit *** push past the soft block limit
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 0 0 0 3 0 0
[NAME] +- 140 100 500 4 4 10 [NAME] +- 140 100 500 4 4 10
*** push past the hard inode limit (expect EDQUOT) *** push past the hard inode limit (expect EDQUOT)
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 4 0 0 3 0 0
[NAME] ++ 140 100 500 16 4 10 [NAME] ++ 140 100 500 16 4 10
*** push past the hard block limit (expect EDQUOT) *** push past the hard block limit (expect EDQUOT)
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 4 0 0 3 0 0
[NAME] ++ 540 100 500 16 4 10 [NAME] ++ 540 100 500 16 4 10
*** unmount *** unmount
-12
View File
@@ -14,8 +14,6 @@ Group used soft hard grace used soft hard grace
---------------------------------------------------------------------- ----------------------------------------------------------------------
[NAME] -- 0 0 0 3 0 0 [NAME] -- 0 0 0 3 0 0
*** report initial settings *** report initial settings
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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 0 0 3 0 0
[NAME] -- 0 100 500 1 4 10 [NAME] -- 0 100 500 1 4 10
*** push past the soft inode limit *** push past the soft inode limit
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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 0 0 3 0 0
[NAME] -- 0 100 500 3 4 10 [NAME] -- 0 100 500 3 4 10
*** push past the soft block limit *** push past the soft block limit
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 0 0 0 3 0 0
[NAME] +- 140 100 500 7days 4 4 10 7days [NAME] +- 140 100 500 7days 4 4 10 7days
*** push past the hard inode limit (expect EDQUOT) *** push past the hard inode limit (expect EDQUOT)
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 0 0 0 3 0 0
[NAME] ++ 140 100 500 7days 10 4 10 7days [NAME] ++ 140 100 500 7days 10 4 10 7days
*** push past the hard block limit (expect EDQUOT) *** push past the hard block limit (expect EDQUOT)
*** Report for group quotas on device [DEVICE] *** Report for group quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 0 0 0 3 0 0
[NAME] ++ OK 100 500 7days 10 4 10 7days [NAME] ++ OK 100 500 7days 10 4 10 7days
*** unmount *** unmount
-12
View File
@@ -14,8 +14,6 @@ User used soft hard grace used soft hard grace
---------------------------------------------------------------------- ----------------------------------------------------------------------
[NAME] -- 0 0 0 3 0 0 [NAME] -- 0 0 0 3 0 0
*** report initial settings *** report initial settings
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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 0 0 3 0 0
[NAME] -- 0 100 500 1 4 10 [NAME] -- 0 100 500 1 4 10
*** push past the soft inode limit *** push past the soft inode limit
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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 0 0 3 0 0
[NAME] -- 0 100 500 3 4 10 [NAME] -- 0 100 500 3 4 10
*** push past the soft block limit *** push past the soft block limit
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 0 0 0 3 0 0
[NAME] +- 140 100 500 4 4 10 [NAME] +- 140 100 500 4 4 10
*** push past the hard inode limit (expect EDQUOT) *** push past the hard inode limit (expect EDQUOT)
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 4 0 0 3 0 0
[NAME] ++ 140 100 500 16 4 10 [NAME] ++ 140 100 500 16 4 10
*** push past the hard block limit (expect EDQUOT) *** push past the hard block limit (expect EDQUOT)
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 4 0 0 3 0 0
[NAME] ++ 540 100 500 16 4 10 [NAME] ++ 540 100 500 16 4 10
*** unmount *** unmount
-12
View File
@@ -14,8 +14,6 @@ User used soft hard grace used soft hard grace
---------------------------------------------------------------------- ----------------------------------------------------------------------
[NAME] -- 0 0 0 3 0 0 [NAME] -- 0 0 0 3 0 0
*** report initial settings *** report initial settings
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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 0 0 3 0 0
[NAME] -- 0 100 500 1 4 10 [NAME] -- 0 100 500 1 4 10
*** push past the soft inode limit *** push past the soft inode limit
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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 0 0 3 0 0
[NAME] -- 0 100 500 3 4 10 [NAME] -- 0 100 500 3 4 10
*** push past the soft block limit *** push past the soft block limit
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 0 0 0 3 0 0
[NAME] +- 140 100 500 7days 4 4 10 7days [NAME] +- 140 100 500 7days 4 4 10 7days
*** push past the hard inode limit (expect EDQUOT) *** push past the hard inode limit (expect EDQUOT)
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 0 0 0 3 0 0
[NAME] ++ 140 100 500 7days 10 4 10 7days [NAME] ++ 140 100 500 7days 10 4 10 7days
*** push past the hard block limit (expect EDQUOT) *** push past the hard block limit (expect EDQUOT)
*** Report for user quotas on device [DEVICE] *** Report for user quotas on device [DEVICE]
Block grace time: 7days; Inode grace time: 7days 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] -- 0 0 0 3 0 0
[NAME] ++ OK 100 500 7days 10 4 10 7days [NAME] ++ OK 100 500 7days 10 4 10 7days
*** unmount *** unmount
+1 -1
View File
@@ -88,7 +88,7 @@ _choose_gid()
_filter_repquota() _filter_repquota()
{ {
perl -ne " head -$1 | perl -ne "
s/^(\w+)\s+([-|+])/[NAME] \2/g; s/^(\w+)\s+([-|+])/[NAME] \2/g;
s,$SCRATCH_DEV,[DEVICE],g; s,$SCRATCH_DEV,[DEVICE],g;
print" print"