* [PATCH] xfstests: btrfs/004: fix to make test really work
@ 2014-02-10 12:10 Wang Shilong
2014-02-10 19:18 ` Josef Bacik
2014-02-10 21:39 ` Dave Chinner
0 siblings, 2 replies; 6+ messages in thread
From: Wang Shilong @ 2014-02-10 12:10 UTC (permalink / raw)
To: xfs; +Cc: linux-btrfs, Wang Shilong
From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
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@cn.fujitsu.com>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] xfstests: btrfs/004: fix to make test really work
2014-02-10 12:10 [PATCH] xfstests: btrfs/004: fix to make test really work Wang Shilong
@ 2014-02-10 19:18 ` Josef Bacik
2014-02-11 1:22 ` Wang Shilong
2014-02-10 21:39 ` Dave Chinner
1 sibling, 1 reply; 6+ messages in thread
From: Josef Bacik @ 2014-02-10 19:18 UTC (permalink / raw)
To: Wang Shilong, xfs; +Cc: linux-btrfs, Wang Shilong
On 02/10/2014 07:10 AM, Wang Shilong wrote:
> From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
>
> 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.
>
So now with this patch I'm failing it, is there some btrfs patch I need
to make it not fail or is it still not supposed to fail normally and is
this patch broken? Thanks,
Josef
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: btrfs/004: fix to make test really work
2014-02-10 19:18 ` Josef Bacik
@ 2014-02-11 1:22 ` Wang Shilong
2014-02-11 2:01 ` Josef Bacik
0 siblings, 1 reply; 6+ messages in thread
From: Wang Shilong @ 2014-02-11 1:22 UTC (permalink / raw)
To: Josef Bacik; +Cc: Wang Shilong, xfs, linux-btrfs
Hi Josef,
On 02/11/2014 03:18 AM, Josef Bacik wrote:
>
>
> On 02/10/2014 07:10 AM, Wang Shilong wrote:
>> From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
>>
>> 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.
>>
>
> So now with this patch I'm failing it, is there some btrfs patch I
> need to make it not fail or is it still not supposed to fail normally
> and is this patch broken? Thanks,
You should not have updated my previous patch(Btrfs: switch to
btrfs_previous_extent_item()) when you fail this test.
I update your latest btrfs-next which has updated my previous patch and
it can pass this case, did you miss that?
Thanks,
Wang
>
> Josef
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: btrfs/004: fix to make test really work
2014-02-11 1:22 ` Wang Shilong
@ 2014-02-11 2:01 ` Josef Bacik
0 siblings, 0 replies; 6+ messages in thread
From: Josef Bacik @ 2014-02-11 2:01 UTC (permalink / raw)
To: Wang Shilong; +Cc: Wang Shilong, xfs, linux-btrfs
On 02/10/2014 08:22 PM, Wang Shilong wrote:
> Hi Josef,
>
> On 02/11/2014 03:18 AM, Josef Bacik wrote:
>>
>>
>> On 02/10/2014 07:10 AM, Wang Shilong wrote:
>>> From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
>>>
>>> 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.
>>>
>>
>> So now with this patch I'm failing it, is there some btrfs patch I
>> need to make it not fail or is it still not supposed to fail normally
>> and is this patch broken? Thanks,
> You should not have updated my previous patch(Btrfs: switch to
> btrfs_previous_extent_item()) when you fail this test.
> I update your latest btrfs-next which has updated my previous patch
> and it can pass this case, did you miss that?
Hrm I must not have insmod'ed the new module, which now means I have to
re-run all my tests, sigh.
Josef
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: btrfs/004: fix to make test really work
2014-02-10 12:10 [PATCH] xfstests: btrfs/004: fix to make test really work Wang Shilong
2014-02-10 19:18 ` Josef Bacik
@ 2014-02-10 21:39 ` Dave Chinner
2014-02-11 1:24 ` Wang Shilong
1 sibling, 1 reply; 6+ messages in thread
From: Dave Chinner @ 2014-02-10 21:39 UTC (permalink / raw)
To: Wang Shilong; +Cc: xfs, linux-btrfs, Wang Shilong
On Mon, Feb 10, 2014 at 08:10:56PM +0800, Wang Shilong wrote:
> From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
>
> 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@cn.fujitsu.com>
> ---
> 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, " "'
Oh, boy, who allowed that mess to pass review? Please format this in
a readable manner while you are changing it.
FILEFRAG_FILTER='
if (/blocks of (\d+) bytes/) { \
$blocksize = $1; \
next; \
}
.....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] xfstests: btrfs/004: fix to make test really work
2014-02-10 21:39 ` Dave Chinner
@ 2014-02-11 1:24 ` Wang Shilong
0 siblings, 0 replies; 6+ messages in thread
From: Wang Shilong @ 2014-02-11 1:24 UTC (permalink / raw)
To: Dave Chinner; +Cc: Wang Shilong, xfs, linux-btrfs
On 02/11/2014 05:39 AM, Dave Chinner wrote:
> On Mon, Feb 10, 2014 at 08:10:56PM +0800, Wang Shilong wrote:
>> From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
>>
>> 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@cn.fujitsu.com>
>> ---
>> 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, " "'
> Oh, boy, who allowed that mess to pass review? Please format this in
> a readable manner while you are changing it.
Yeah, i was thinking to make it more readable while i had sent this out.^_^
Thanks for your comments.
Wang
>
> FILEFRAG_FILTER='
> if (/blocks of (\d+) bytes/) { \
> $blocksize = $1; \
> next; \
> }
> .....
>
> Cheers,
>
> Dave.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-11 2:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 12:10 [PATCH] xfstests: btrfs/004: fix to make test really work Wang Shilong
2014-02-10 19:18 ` Josef Bacik
2014-02-11 1:22 ` Wang Shilong
2014-02-11 2:01 ` Josef Bacik
2014-02-10 21:39 ` Dave Chinner
2014-02-11 1:24 ` Wang Shilong
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).