* [PATCH 1/2] generic/294: Filter backquotes from mknod error output @ 2016-07-21 6:17 Jan Kara 2016-07-21 6:17 ` [PATCH 2/2] generic/130: Improve xfs_io filter Jan Kara 0 siblings, 1 reply; 5+ messages in thread From: Jan Kara @ 2016-07-21 6:17 UTC (permalink / raw) To: fstests; +Cc: Jan Kara Really old versions of coreutils (mine are 8.12) quote a filename in the output with a backquote in the beginning and normal quote in the end. Improve _filter_mknod to handle that. Signed-off-by: Jan Kara <jack@suse.cz> --- common/filter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/filter b/common/filter index 8d9f489bea1c..b229a97dfa0e 100644 --- a/common/filter +++ b/common/filter @@ -389,7 +389,7 @@ _filter_od() # mknod errors print unquoted filenames _filter_mknod() { - sed -e "s/mknod: '\(.*\)': File exists/mknod: \1: File exists/" + sed -e "s/mknod: [\`']\(.*\)': File exists/mknod: \1: File exists/" } # make sure this script returns success -- 2.6.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] generic/130: Improve xfs_io filter 2016-07-21 6:17 [PATCH 1/2] generic/294: Filter backquotes from mknod error output Jan Kara @ 2016-07-21 6:17 ` Jan Kara 2016-07-21 6:55 ` Eryu Guan 0 siblings, 1 reply; 5+ messages in thread From: Jan Kara @ 2016-07-21 6:17 UTC (permalink / raw) To: fstests; +Cc: Jan Kara On my test setup xfs_io reports 'nan' in bytes/s and ops/s fields when the operation takes zero time. Account for that in _filter_xfs_io. Signed-off-by: Jan Kara <jack@suse.cz> --- common/filter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/filter b/common/filter index b229a97dfa0e..37f07c8ca1ac 100644 --- a/common/filter +++ b/common/filter @@ -221,7 +221,7 @@ common_line_filter() _filter_xfs_io() { - sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([inf0-9/.]* [EPGMKiBbytes]*\/sec and [inf0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" + sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([infnan0-9/.]* [EPGMKiBbytes]*\/sec and [infnan0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" } _filter_xfs_io_unique() -- 2.6.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] generic/130: Improve xfs_io filter 2016-07-21 6:17 ` [PATCH 2/2] generic/130: Improve xfs_io filter Jan Kara @ 2016-07-21 6:55 ` Eryu Guan 2016-07-21 7:35 ` Jan Kara 0 siblings, 1 reply; 5+ messages in thread From: Eryu Guan @ 2016-07-21 6:55 UTC (permalink / raw) To: Jan Kara; +Cc: fstests On Thu, Jul 21, 2016 at 08:17:36AM +0200, Jan Kara wrote: > On my test setup xfs_io reports 'nan' in bytes/s and ops/s fields when > the operation takes zero time. Account for that in _filter_xfs_io. > > Signed-off-by: Jan Kara <jack@suse.cz> > --- > common/filter | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/filter b/common/filter > index b229a97dfa0e..37f07c8ca1ac 100644 > --- a/common/filter > +++ b/common/filter > @@ -221,7 +221,7 @@ common_line_filter() > > _filter_xfs_io() > { > - sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([inf0-9/.]* [EPGMKiBbytes]*\/sec and [inf0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" > + sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([infnan0-9/.]* [EPGMKiBbytes]*\/sec and [infnan0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" Seems adding only 'a' to the char set is sufficient, 'n' is already in the set, i.e. - ...([inf0-9/.]* ... + ...([infa0-9/.]* ... Thanks, Eryu ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] generic/130: Improve xfs_io filter 2016-07-21 6:55 ` Eryu Guan @ 2016-07-21 7:35 ` Jan Kara 2016-07-21 8:14 ` Jan Kara 0 siblings, 1 reply; 5+ messages in thread From: Jan Kara @ 2016-07-21 7:35 UTC (permalink / raw) To: Eryu Guan; +Cc: Jan Kara, fstests On Thu 21-07-16 14:55:26, Eryu Guan wrote: > On Thu, Jul 21, 2016 at 08:17:36AM +0200, Jan Kara wrote: > > On my test setup xfs_io reports 'nan' in bytes/s and ops/s fields when > > the operation takes zero time. Account for that in _filter_xfs_io. > > > > Signed-off-by: Jan Kara <jack@suse.cz> > > --- > > common/filter | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/common/filter b/common/filter > > index b229a97dfa0e..37f07c8ca1ac 100644 > > --- a/common/filter > > +++ b/common/filter > > @@ -221,7 +221,7 @@ common_line_filter() > > > > _filter_xfs_io() > > { > > - sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([inf0-9/.]* [EPGMKiBbytes]*\/sec and [inf0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" > > + sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([infnan0-9/.]* [EPGMKiBbytes]*\/sec and [infnan0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" > > Seems adding only 'a' to the char set is sufficient, 'n' is already in > the set, i.e. > > - ...([inf0-9/.]* ... > + ...([infa0-9/.]* ... Yeah. I've added 'nan' to document what the letters are there for. But probably I should have added just 'a' and added a comment. I'll respin the patch. Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] generic/130: Improve xfs_io filter 2016-07-21 7:35 ` Jan Kara @ 2016-07-21 8:14 ` Jan Kara 0 siblings, 0 replies; 5+ messages in thread From: Jan Kara @ 2016-07-21 8:14 UTC (permalink / raw) To: Eryu Guan; +Cc: Jan Kara, fstests [-- Attachment #1: Type: text/plain, Size: 1488 bytes --] On Thu 21-07-16 09:35:07, Jan Kara wrote: > On Thu 21-07-16 14:55:26, Eryu Guan wrote: > > On Thu, Jul 21, 2016 at 08:17:36AM +0200, Jan Kara wrote: > > > On my test setup xfs_io reports 'nan' in bytes/s and ops/s fields when > > > the operation takes zero time. Account for that in _filter_xfs_io. > > > > > > Signed-off-by: Jan Kara <jack@suse.cz> > > > --- > > > common/filter | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/common/filter b/common/filter > > > index b229a97dfa0e..37f07c8ca1ac 100644 > > > --- a/common/filter > > > +++ b/common/filter > > > @@ -221,7 +221,7 @@ common_line_filter() > > > > > > _filter_xfs_io() > > > { > > > - sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([inf0-9/.]* [EPGMKiBbytes]*\/sec and [inf0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" > > > + sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([infnan0-9/.]* [EPGMKiBbytes]*\/sec and [infnan0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" > > > > Seems adding only 'a' to the char set is sufficient, 'n' is already in > > the set, i.e. > > > > - ...([inf0-9/.]* ... > > + ...([infa0-9/.]* ... > > Yeah. I've added 'nan' to document what the letters are there for. But > probably I should have added just 'a' and added a comment. I'll respin the > patch. Attached is a revised patch. Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR [-- Attachment #2: 0001-generic-130-Improve-xfs_io-filter.patch --] [-- Type: text/x-patch, Size: 1188 bytes --] >From 8d86c6fe36040e21db3475292a2dd05a280f158f Mon Sep 17 00:00:00 2001 From: Jan Kara <jack@suse.cz> Date: Thu, 21 Jul 2016 08:15:19 +0200 Subject: [PATCH] generic/130: Improve xfs_io filter On my test setup xfs_io reports 'nan' in bytes/s and ops/s fields when the operation takes zero time. Account for that in _filter_xfs_io. Signed-off-by: Jan Kara <jack@suse.cz> --- common/filter | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/filter b/common/filter index b229a97dfa0e..f80cd562af71 100644 --- a/common/filter +++ b/common/filter @@ -221,7 +221,9 @@ common_line_filter() _filter_xfs_io() { - sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([inf0-9/.]* [EPGMKiBbytes]*\/sec and [inf0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" + # Apart from standard numeric values, we also filter out 'inf' and 'nan' + # which can result from division in some cases + sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([infa0-9/.]* [EPGMKiBbytes]*\/sec and [infa0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" } _filter_xfs_io_unique() -- 2.6.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-21 8:14 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-07-21 6:17 [PATCH 1/2] generic/294: Filter backquotes from mknod error output Jan Kara 2016-07-21 6:17 ` [PATCH 2/2] generic/130: Improve xfs_io filter Jan Kara 2016-07-21 6:55 ` Eryu Guan 2016-07-21 7:35 ` Jan Kara 2016-07-21 8:14 ` Jan Kara
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox