public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Eric Whitney <enwlinux@gmail.com>
Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] common/filter: extend _filter_xfs_io to match -nan
Date: Thu, 14 Apr 2022 08:29:49 -0700	[thread overview]
Message-ID: <20220414152949.GA17014@magnolia> (raw)
In-Reply-To: <20220414142258.761835-1-enwlinux@gmail.com>

On Thu, Apr 14, 2022 at 10:22:58AM -0400, Eric Whitney wrote:
> When run on ext4 with sufficiently fast x86_64 hardware, generic/130
> sometimes fails because xfs_io can report rate values as -nan:
> 0.000000 bytes, 0 ops; 0.0000 sec (-nan bytes/sec and -nan ops/sec)
> 
> _filter_xfs_io matches the strings 'inf' or 'nan', but not '-nan'.  In
> that case it fails to convert the actual output to a normalized form
> matching generic/130's golden output.  Extend the regular expression
> used to match xfs_io's output to fix this.
> 
> Signed-off-by: Eric Whitney <enwlinux@gmail.com>
> ---
>  common/filter | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/common/filter b/common/filter
> index 5fe86756..5b20e848 100644
> --- a/common/filter
> +++ b/common/filter
> @@ -168,9 +168,9 @@ common_line_filter()
>  
>  _filter_xfs_io()
>  {
> -    # 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)/"
> +    # Apart from standard numeric values, we also filter out 'inf', 'nan', 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)/"

/me squints at this regular expression and /thinks/ its ok.

Took me a while to figure out "infa" tho. :P

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

>  }
>  
>  # Also filter out the offset part of xfs_io output
> -- 
> 2.30.2
> 

  reply	other threads:[~2022-04-14 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 14:22 [PATCH] common/filter: extend _filter_xfs_io to match -nan Eric Whitney
2022-04-14 15:29 ` Darrick J. Wong [this message]
2022-04-15 15:10   ` Eric Whitney

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=20220414152949.GA17014@magnolia \
    --to=djwong@kernel.org \
    --cc=enwlinux@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox