Re: [PATCH v2 1/2] xfs/029: filter out "extended-header: cycle: 1" from output

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxxxxxxxxx>
> ---
>  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>"?

>  	    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
> 
> 
> 



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux