[PATCH lkp-tests] stats/iozone: fix iozone cannot match the line of part test

[why] iozone can match the line like: 64 4 1599680 3057153 4274062 4897948 3588436 2892445 2772930 3057153 3958892 3057153 3022727 3363612 4564786 but cannot match the line as below: 64 4 1599680 3057153 4274062 4897948 3588436 2892445 [how] line.rstrip! before match Signed-off-by: Lu Kaiyi <2392863668@qq.com> --- stats/iozone | 1 + 1 file changed, 1 insertion(+) diff --git a/stats/iozone b/stats/iozone index 9f7ee72f..ff389c48 100755 --- a/stats/iozone +++ b/stats/iozone @@ -8,6 +8,7 @@ per_record = {} all_sum = 0 nr_records = 0 while (line = STDIN.gets) + line.rstrip! next unless line =~ /^\s*\d+.*\d+$/ data = line.split -- 2.23.0

On Tue, Nov 17, 2020 at 10:45:32AM +0800, Lu Kaiyi wrote:
[why] iozone can match the line like:
64 4 1599680 3057153 4274062 4897948 3588436 2892445 2772930 3057153 3958892 3057153 3022727 3363612 4564786
but cannot match the line as below:
64 4 1599680 3057153 4274062 4897948 3588436 2892445
没看懂。 为啥会有不同形式的行?有更全的上下文/背景吗? Thanks, Fengguang
[how] line.rstrip! before match
Signed-off-by: Lu Kaiyi <2392863668@qq.com> --- stats/iozone | 1 + 1 file changed, 1 insertion(+)
diff --git a/stats/iozone b/stats/iozone index 9f7ee72f..ff389c48 100755 --- a/stats/iozone +++ b/stats/iozone @@ -8,6 +8,7 @@ per_record = {} all_sum = 0 nr_records = 0 while (line = STDIN.gets) + line.rstrip! next unless line =~ /^\s*\d+.*\d+$/
data = line.split -- 2.23.0
participants (2)
-
Lu Kaiyi
-
Wu Fengguang