From: Filipe David Borba Manana Date: Tue, 22 Apr 2014 00:46:34 +0000 (+1000) Subject: btrfs/004: fix filefrag filter for files with 1 block only X-Git-Tag: v2022.05.01~3164 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=73d944303ae92d7a7f71bbf1bba6dfd758450c71;p=users%2Fhch%2Fxfstests-dev.git btrfs/004: fix filefrag filter for files with 1 block only If the file consists of a single block, then filefrag mentions '1 block of ...', and the filter expected 'blocks of ...'. Example: $ echo qwerty > foobar $ filefrag -v foobar Filesystem type is: ef53 File size of foobar is 7 (1 block of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 0: 0.. 0: 1: unknown,delalloc,eof foobar: 1 extent found Signed-off-by: Filipe David Borba Manana Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/tests/btrfs/004 b/tests/btrfs/004 index 211d8bc20..670e1c231 100755 --- a/tests/btrfs/004 +++ b/tests/btrfs/004 @@ -58,7 +58,7 @@ _require_command "/usr/sbin/filefrag" rm -f $seqres.full FILEFRAG_FILTER=' - if (/blocks of (\d+) bytes/) { + if (/blocks? of (\d+) bytes/) { $blocksize = $1; next }