mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
updates to run (more) cleanly with quota mount option(s). expanded
notrun messages for those tests which are skipped with more details.
This commit is contained in:
@@ -100,8 +100,10 @@ _log_traffic()
|
||||
fi
|
||||
|
||||
# having any quota enabled (acct/enfd) means extra log traffic - evil!
|
||||
$here/src/feature -U $SCRATCH_DEV && _notrun "User quota are enabled"
|
||||
$here/src/feature -G $SCRATCH_DEV && _notrun "Group quota are enabled"
|
||||
$here/src/feature -U $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled log traffic"
|
||||
$here/src/feature -G $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled log traffic"
|
||||
|
||||
echo " *** fiddle"
|
||||
while [ $count -ge 0 ]
|
||||
|
||||
@@ -94,6 +94,7 @@ _filter_logprint()
|
||||
s/atime 0x[0-9a-f]* mtime 0x[0-9a-f]* ctime 0x[0-9a-f]*/atime <TIME> mtime <TIME> ctime <TIME>/;
|
||||
s/block [0-9][0-9]*/block <BLOCK>/;
|
||||
s/icount: *[0-9][0-9]* *ifree: *[0-9][0-9]* *fdblks: *[0-9][0-9]* *frext: *[0-9][0-9]*/icount:<COUNT> ifree:<FREE> fdblks:<BLOCKS> frext:<COUNT>/;
|
||||
s/sunit: *[0-9][0-9]* *swidth: *[0-9][0-9]*/sunit:<SUNIT> swidth:<SWIDTH>/;
|
||||
s/1st: *[0-9][0-9]* *last: *[0-9][0-9]* *cnt: *[0-9][0-9]* *freeblks: *[0-9][0-9]* *longest: *[0-9][0-9]*/1st:<NUM> last:<NUM> cnt:<COUNT> freeblks:<COUNT> longest:<NUM>/;
|
||||
s/^uuid: *[0-9a-f-][0-9a-f-]* *format: *.*$/uuid: <UUID> format: <FORMAT>/;
|
||||
'
|
||||
|
||||
+2342
-2478
File diff suppressed because it is too large
Load Diff
+101
-101
File diff suppressed because it is too large
Load Diff
+2297
-2507
File diff suppressed because it is too large
Load Diff
+2342
-2478
File diff suppressed because it is too large
Load Diff
@@ -45,7 +45,14 @@ echo "QA output created by $seq"
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1 # failure is the default!
|
||||
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
rm -f $tmp.*
|
||||
}
|
||||
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
@@ -74,17 +81,22 @@ size="-d size=100m"
|
||||
mkfs -t xfs -f $size $SCRATCH_DEV >/dev/null 2>&1
|
||||
if [ $? -ne 0 ] # probably don't have a big enough scratch
|
||||
then
|
||||
size=""
|
||||
src/devzero -v -1 $SCRATCH_DEV >/dev/null
|
||||
_notrun "SCRATCH_DEV too small, results would be non-deterministic"
|
||||
else
|
||||
clear=""
|
||||
eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | perl -ne '
|
||||
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
|
||||
src/feature -U $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled sb recovery"
|
||||
src/feature -G $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled sb recovery"
|
||||
umount $SCRATCH_DEV
|
||||
fi
|
||||
clear=""
|
||||
eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | perl -ne '
|
||||
if (/byte offset (\d+), length (\d+)/) {
|
||||
print "clear=", $1 / 512, "\n"; exit
|
||||
}'`
|
||||
[ -z "$clear" ] && echo "Cannot calculate length to clear"
|
||||
src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
|
||||
fi
|
||||
[ -z "$clear" ] && echo "Cannot calculate length to clear"
|
||||
src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
|
||||
|
||||
# now kick off the real repair test...
|
||||
#
|
||||
|
||||
@@ -45,7 +45,14 @@ echo "QA output created by $seq"
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1 # failure is the default!
|
||||
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
rm -f $tmp.*
|
||||
}
|
||||
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
@@ -71,11 +78,19 @@ _require_scratch
|
||||
mkfs -t xfs -f -i size=512 $SCRATCH_DEV | _filter_mkfs 2>/dev/null
|
||||
`xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
|
||||
sed -e 's/ //g' -e 's/^/export /'`
|
||||
|
||||
# check we won't get any quota inodes setup on mount
|
||||
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
|
||||
src/feature -U $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled sb recovery"
|
||||
src/feature -G $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled sb recovery"
|
||||
umount $SCRATCH_DEV
|
||||
|
||||
# rootino, rbmino, and rsumino are now set (lets blow em away!)
|
||||
_check_root_inos 0
|
||||
_check_root_inos -1
|
||||
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
|
||||
+6
-6
@@ -10,7 +10,7 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 0 0 0 3 0 0
|
||||
|
||||
@@ -20,7 +20,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 0 0 0 3 0 0
|
||||
[NAME] -- 0 100 500 1 4 10
|
||||
@@ -31,7 +31,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 0 0 0 3 0 0
|
||||
[NAME] -- 0 100 500 3 4 10
|
||||
@@ -42,7 +42,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 0 0 0 3 0 0
|
||||
[NAME] +- 140 100 500 4 4 10
|
||||
@@ -53,7 +53,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 4 0 0 3 0 0
|
||||
[NAME] ++ 140 100 500 16 4 10
|
||||
@@ -64,7 +64,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 4 0 0 3 0 0
|
||||
[NAME] ++ 540 100 500 16 4 10
|
||||
|
||||
+6
-6
@@ -10,7 +10,7 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 0 0 0 3 0 0
|
||||
|
||||
@@ -20,7 +20,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 0 0 0 3 0 0
|
||||
[NAME] -- 0 100 500 1 4 10
|
||||
@@ -31,7 +31,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 0 0 0 3 0 0
|
||||
[NAME] -- 0 100 500 3 4 10
|
||||
@@ -42,7 +42,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
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
|
||||
@@ -53,7 +53,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
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
|
||||
@@ -64,7 +64,7 @@ User used soft hard grace used soft hard grace
|
||||
*** Report for group quotas on device [DEVICE]
|
||||
Block grace time: 7days; Inode grace time: 7days
|
||||
Block limits File limits
|
||||
User used soft hard grace used soft hard grace
|
||||
Group used soft hard grace used soft hard grace
|
||||
----------------------------------------------------------------------
|
||||
[NAME] -- 0 0 0 3 0 0
|
||||
[NAME] ++ 448 100 500 7days 10 4 10 7days
|
||||
|
||||
Reference in New Issue
Block a user