All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: <guaneryu@gmail.com>, <fstests@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] xfs/029: filter out "extended-header: cycle: 1" from output
Date: Fri, 21 Feb 2020 09:45:19 +0800	[thread overview]
Message-ID: <ecaecca4-ef6e-e0b7-0523-feb49a7df25d@cn.fujitsu.com> (raw)
In-Reply-To: <20200220233004.GG9511@magnolia>



on 2020/02/21 7:30, Darrick J. Wong wrote:
> On Thu, Feb 20, 2020 at 03:58:47PM +0800, Yang Xu wrote:
>> When I test this case(default lsunit 256k), this case will fail,
>> as below:
>> cycle: 1        version: 2              lsn: 1,0        tail_lsn: 1,0
>> length of Log Record: 258048    prev offset: -1         num ops: 1
>>
>> ...
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> extended-header: cycle: 1
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ...
>>
>> It reports this info because xfs_logprint only read 32k header every time, so it
>> needs to read more times. We can filter this useless info.
>>
>> common/log also has _filter_logprint function. only library function is
>> prefixed with "_", remove '_'.
>>
>> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
>> ---
>>   tests/xfs/029 | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/xfs/029 b/tests/xfs/029
>> index f532a21b..dbe700ab 100755
>> --- a/tests/xfs/029
>> +++ b/tests/xfs/029
>> @@ -19,7 +19,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
>>   . ./common/rc
>>   . ./common/filter
>>   
>> -_filter_logprint()
>> +filter_logprint()
>>   {
>>   	perl -ne '
>>   	    s/data device: ([\w|\/.-]+)/data device: DDEV/;
>> @@ -31,6 +31,8 @@ _filter_logprint()
>>               s/(length of Log Record:) \d+/$1 <LEN>/;
>>               s/version: \d/version: <VERN>/;
>>   	    s/h_size: \d+/h_size: <H_SIZE>/;
>> +	    s/^~+[\r|\n]+$//;
>> +	    s/extended-header: cycle: 1[\r|\n]+$//;
> 
> I guess this works, but do you want to delete this line for line with
> "extended-header: cycle: <some number>"?
Yes, because this line happens depend on log size(every 32k print a 
line, exclude the first, so 256k prints 7 line). This case is design to
test mkfs log(internal/external) zeroing. IMO, this line doesn't matter
unless we want to test 32k read header(If so, specify -lsunit=128, but I 
want to keep origal design).

Best Regards
Yang Xu
> 
>>   	    print;
>>   	'
>>   }
>> @@ -45,7 +47,7 @@ echo
>>   _scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
>>   
>>   echo
>> -_scratch_xfs_logprint | _filter_logprint
>> +_scratch_xfs_logprint | filter_logprint
> 
> Thanks for cleaning out the ^ leading underscore.
> 
> --D
> 
>>   
>>   status=0
>>   exit
>> -- 
>> 2.18.0
>>
>>
>>
> 
> 



      reply	other threads:[~2020-02-21  1:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17  7:02 [PATCH] xfs/029: filter out "extended-header: cycle: 1" from output Yang Xu
2020-02-19  0:32 ` Darrick J. Wong
2020-02-19  1:27   ` Yang Xu
2020-02-19  5:07     ` Darrick J. Wong
2020-02-19  9:49       ` Yang Xu
2020-02-19 22:09         ` Darrick J. Wong
2020-02-20  2:11           ` Yang Xu
2020-02-20  7:58           ` [PATCH v2 1/2] " Yang Xu
2020-02-20  7:58             ` [PATCH v2 2/2] xfs/044: Remove useless _filter_logprint Yang Xu
2020-02-20 23:30               ` Darrick J. Wong
2020-02-20 23:30             ` [PATCH v2 1/2] xfs/029: filter out "extended-header: cycle: 1" from output Darrick J. Wong
2020-02-21  1:45               ` Yang Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ecaecca4-ef6e-e0b7-0523-feb49a7df25d@cn.fujitsu.com \
    --to=xuyang2018.jy@cn.fujitsu.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.