xfstests: move xfs_io filters to common.filter
PATCH 2/3 xfstests: move xfs_io filters to common.filter
Move duplicated xfs_io filters to common.filter
Also fix up 132 output, which was misfiltered due
to a bug in the filtering.
Doing this because I need this same filter for the next added test.
---
071 +0 -0
index 15067b9..303498e 100755
071 +0 -5
@@ -53,11 +53,6 @@ _filter_off() sed -e "s/$1/<OFFSET>/g" | _filter_io } -_filter_xfs_io() -{ - sed -e "s/[0-9/.]* bytes, [0-9] ops\; [0-9/.]* sec ([0-9/.]* [MKiBbytes]*\/sec and [0-9/.]* ops\/sec)/XXX bytes, X ops\; XXX sec (X YYY\/sec and XXX ops\/sec/" -} - write_block() { location=$1
130 +15 -32
120 lines not on this page · raw message
132 +13 -30
127 lines not on this page · raw message
132.out +4 -0
@@ -383,6 +383,8 @@ XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) * read 65536/65536 bytes at offset 65536 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +00020000: 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 vvvvvvvvvvvvvvvv +* read 65536/65536 bytes at offset 131072 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 00030000: 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 wwwwwwwwwwwwwwww
@@ -437,6 +439,8 @@ XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) * read 131072/131072 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +00020000: 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 vvvvvvvvvvvvvvvv +* 00030000: 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 wwwwwwwwwwwwwwww * read 131072/131072 bytes at offset 131072
common.filter +22 -0
@@ -192,5 +192,27 @@ _filter_dd() ' } +common_line_filter() +{ + perl -ne 'if (/.*:(.*)/) { + if ( "$last_line" ne "$1" ) { print "$_"; $first_match=1; } + elsif ( $first_match==1 ) { print "*\n"; $first_match=0; } + $last_line="$1"; + } + else { + print $_; $last_line=$_; + }' +} + +_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)/" +} + +_filter_xfs_io_unique() +{ + common_line_filter | _filter_xfs_io +} + # make sure this script returns success /bin/true
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 7 lines · Eric Sandeen
Move duplicated
xfs_iofilters to common.filterAlso fix up 132 output, which was misfiltered due
to a bug in the filtering.Doing this because I need this same filter for the next added test.
Ah, nice - common filters for xfs_io output were long overdue.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs