From 9fe508dfb955ff49e7e87aa208717a1cbf525437 Mon Sep 17 00:00:00 2001 From: Marcos Casagrande Date: Sun, 16 Oct 2022 21:37:42 +0200 Subject: fix(cli/bench): skip strace table border (#16310) It crashes due to the table border output from `strace`, ``` % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- # this is skipped correctly 61.27 6.012053 678 8860 637 futex 0.00 0.000000 0 4 geteuid ------ ----------- ----------- --------- --------- ---------------- # this causes the crash 100.00 11.732230 25552 1205 total ``` It's flaky because that line is not always skipped from the output, for some reason that I've yet to find out. --- test_util/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test_util/src') diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index 363fe5d3f..b5d509945 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -2198,9 +2198,12 @@ pub fn parse_strace_output(output: &str) -> HashMap { // Filter out non-relevant lines. See the error log at // https://github.com/denoland/deno/pull/3715/checks?check_run_id=397365887 // This is checked in testdata/strace_summary2.out - let mut lines = output - .lines() - .filter(|line| !line.is_empty() && !line.contains("detached ...")); + let mut lines = output.lines().filter(|line| { + !line.is_empty() + && !line.contains("detached ...") + && !line.contains("unfinished ...") + && !line.contains("????") + }); let count = lines.clone().count(); if count < 4 { @@ -2215,7 +2218,6 @@ pub fn parse_strace_output(output: &str) -> HashMap { let syscall_fields = line.split_whitespace().collect::>(); let len = syscall_fields.len(); let syscall_name = syscall_fields.last().unwrap(); - if (5..=6).contains(&len) { summary.insert( syscall_name.to_string(), -- cgit v1.2.3