]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
common/filter: extend _filter_xfs_io to match -nan
authorEric Whitney <enwlinux@gmail.com>
Thu, 14 Apr 2022 14:22:58 +0000 (10:22 -0400)
committerEryu Guan <guaneryu@gmail.com>
Sun, 17 Apr 2022 12:32:05 +0000 (20:32 +0800)
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>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/filter

index 5fe86756ef6ed11444c0ddce416daa0b5aa637ab..5b20e848c9b9ebbcf7608ee71586dad56a4bdd6e 100644 (file)
@@ -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