linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfstests: btrfs/004, fix filefrag filter for files with 1 block only
@ 2014-04-18  3:34 Filipe David Borba Manana
  0 siblings, 0 replies; only message in thread
From: Filipe David Borba Manana @ 2014-04-18  3:34 UTC (permalink / raw)
  To: xfs; +Cc: linux-btrfs, jbacik, Filipe David Borba Manana

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 <fdmanana@gmail.com>
---
 tests/btrfs/004 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/btrfs/004 b/tests/btrfs/004
index 211d8bc..670e1c2 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
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-18  2:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18  3:34 [PATCH] xfstests: btrfs/004, fix filefrag filter for files with 1 block only Filipe David Borba Manana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).