From: Eric Whitney <enwlinux@gmail.com>
To: fstests@vger.kernel.org
Cc: linux-ext4@vger.kernel.org, Eric Whitney <enwlinux@gmail.com>
Subject: [PATCH] common/filter: extend _filter_xfs_io to match -nan
Date: Thu, 14 Apr 2022 10:22:58 -0400 [thread overview]
Message-ID: <20220414142258.761835-1-enwlinux@gmail.com> (raw)
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)/"
}
# Also filter out the offset part of xfs_io output
--
2.30.2
next reply other threads:[~2022-04-14 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 14:22 Eric Whitney [this message]
2022-04-14 15:29 ` [PATCH] common/filter: extend _filter_xfs_io to match -nan Darrick J. Wong
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=20220414142258.761835-1-enwlinux@gmail.com \
--to=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