xfs
[Top] [All Lists]

[PATCH] xfstests: btrfs/004: fix to make test really work

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfstests: btrfs/004: fix to make test really work
From: Wang Shilong <wangshilong1991@xxxxxxxxx>
Date: Mon, 10 Feb 2014 20:10:56 +0800
Cc: linux-btrfs@xxxxxxxxxxxxxxx, Wang Shilong <wangsl.fnst@xxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=AEJxpW21Iequ7mcMcC5TcaSPOo+qfcscS7DJBoYrL2o=; b=g6vOU9TxUPFcfD7rlu56q37/TgkE92i+OiQmBxRq7aUdrSUHy71oQNaj5zam3Qp6ZK dlfOO8v/cnJ7mWmwtDHQ+TUELguFL7DqijXNj/gvHOqn5FzUdzRR+UsUBWCKXlTfHyEH qcA/Jj0JLesU2zHHdKBlmuAxerPkYAgixjmTAiBzkPCy4Fxx6MRl/ugI/XhNhrNIDtWk hThHZZsm+ULPLb0i5CptCQrbBwlYGIXdkdVqh8JgGGDsre5LPH4roznc/ZGRk+RKAS3m HrFSOMRmA6gzl+GougGQhrbEDYxfjI4tzwoElZO7a8TwTxIsCOa7GaVnFvutrNxPyyh5 mIeg==
From: Wang Shilong <wangsl.fnst@xxxxxxxxxxxxxx>

So i was wandering 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@xxxxxxxxxxxxxx>
---
 tests/btrfs/004 | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
 mode change 100755 => 100644 tests/btrfs/004

diff --git a/tests/btrfs/004 b/tests/btrfs/004
old mode 100755
new mode 100644
index 14da9f1..17a6e34
--- a/tests/btrfs/004
+++ b/tests/btrfs/004
@@ -57,10 +57,9 @@ _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, "#", '\
+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.
-- 
1.8.4

<Prev in Thread] Current Thread [Next in Thread>