mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
_choose_id function has changed slightly, run setquota once user is inited.
This commit is contained in:
@@ -60,7 +60,7 @@ _cleanup()
|
||||
rm -f $tmp.*
|
||||
}
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
rm -f $seq.full $seq.out
|
||||
rm -f $seq.full
|
||||
|
||||
_require_scratch
|
||||
_require_quota
|
||||
@@ -82,9 +82,9 @@ _qmount
|
||||
|
||||
# setup user/group to test
|
||||
if src/feature -U $SCRATCH_DEV ; then
|
||||
type=u ; id=`_choose_uid`
|
||||
type=u ; eval `_choose_uid`
|
||||
elif src/feature -G $SCRATCH_DEV ; then
|
||||
type=g ; id=`_choose_gid`
|
||||
type=g ; eval `_choose_gid`
|
||||
else
|
||||
_notrun "No quota support at mount time"
|
||||
fi
|
||||
@@ -94,14 +94,19 @@ _file_as_id $SCRATCH_MNT/foo $id $type $dbsize 220
|
||||
sync
|
||||
|
||||
# set limit at 1001 (1k) blocks
|
||||
setquota -n -$type $id $SCRATCH_DEV 1001 1001 10 10
|
||||
setquota -$type $id 1001 1001 10 10 $SCRATCH_DEV
|
||||
|
||||
# cross check blks, softblks, hardblks <-> quota, xfs_db
|
||||
quota $type -n $id | tee -a $seq.full | perl -ne '
|
||||
if (m,^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+),) {
|
||||
quota -$type $id | tee -a $seq.full | perl -ne '
|
||||
if (m,^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+), ||
|
||||
($next == 1 && m,^\s+(\d+)\s+(\d+)\s+(\d+),)) {
|
||||
print "used_blocks=", $1, "\n";
|
||||
print "soft_blocks=", $2, "\n";
|
||||
print "hard_blocks=", $3, "\n";
|
||||
$next = 0;
|
||||
}
|
||||
elsif (m,^\s*'$SCRATCH_DEV',) { # devfs (long) names
|
||||
$next = 1;
|
||||
}' | LC_COLLATE=POSIX sort >$tmp.quota
|
||||
|
||||
echo ===quota output >> $seq.full
|
||||
|
||||
Reference in New Issue
Block a user