mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Fix test 004 for recent TOT kernels.
Merge of master-melb:xfs-cmds:26932a by kenmcd. Take into account out put from df does not include space required for AG freelists on 2.6.18+ kernels.
This commit is contained in:
@@ -68,13 +68,19 @@ echo "xfs_db for $SCRATCH_DEV" >>$seq.full
|
||||
cat $tmp.xfs_db >>$seq.full
|
||||
|
||||
# check the 'blocks' field from freesp command is OK
|
||||
# since 2.6.18, df does not report the 4 blocks per AG that cannot
|
||||
# be allocated, hence we check for that exact mismatch.
|
||||
perl -ne '
|
||||
BEGIN { $avail ='$avail' * 512;
|
||||
$answer="(no xfs_db free blocks line?)" }
|
||||
/free blocks (\d+)$/ || next;
|
||||
$freesp = $1 * '$dbsize';
|
||||
if ($freesp == $avail) { $answer = "yes"; }
|
||||
else { $answer = "no ($freesp != $avail)"; }
|
||||
else {
|
||||
$avail = $avail + (('$agcount' + 1) * '$dbsize' * 4);
|
||||
if ($freesp == $avail) { $answer = "yes"; }
|
||||
else { $answer = "no ($freesp != $avail)"; }
|
||||
}
|
||||
END { print "$answer\n" }
|
||||
' <$tmp.xfs_db >$tmp.ans
|
||||
ans="`cat $tmp.ans`"
|
||||
|
||||
Reference in New Issue
Block a user