mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
btrfs/004: fix to make test really work
So I was wondering why test 004 could pass my previous wrong kernel patch while it defenitely should not. By some debugging, i found here perl script is wrong, we did not filter out anything and this unit test did not work acutally.so it came out we will never fail this test. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
b985883b2c
commit
617252fc09
+11
-5
@@ -57,11 +57,17 @@ _require_command "/usr/sbin/filefrag"
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
FILEFRAG_FILTER='if (/, blocksize (\d+)/) {$blocksize = $1; next} ($ext, '\
|
||||
'$logical, $physical, $expected, $length, $flags) = (/^\s*(\d+)\s+(\d+)'\
|
||||
'\s+(\d+)\s+(?:(\d+)\s+)?(\d+)\s+(.*)/) or next; $flags =~ '\
|
||||
'/(?:^|,)inline(?:,|$)/ and next; print $physical * $blocksize, "#", '\
|
||||
'$length * $blocksize, "#", $logical * $blocksize, " "'
|
||||
FILEFRAG_FILTER='
|
||||
if (/blocks of (\d+) bytes/) {
|
||||
$blocksize = $1;
|
||||
next
|
||||
}
|
||||
($ext, $logical, $physical, $length) =
|
||||
(/^\s*(\d+):\s+(\d+)..\s+\d+:\s+(\d+)..\s+\d+:\s+(\d+):/)
|
||||
or next;
|
||||
print $physical * $blocksize, "#",
|
||||
$length * $blocksize, "#",
|
||||
$logical * $blocksize, " "'
|
||||
|
||||
# this makes filefrag output script readable by using a perl helper.
|
||||
# output is one extent per line, with three numbers separated by '#'
|
||||
|
||||
Reference in New Issue
Block a user