From ff939e64efa808c06d8a548bf133a9dea9b1023c Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 21 Feb 2020 14:18:48 +0100 Subject: don't parse output from abnormally terminated commands --- src/benchmark.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/benchmark.py') diff --git a/src/benchmark.py b/src/benchmark.py index 6ea687d..23e28a7 100644 --- a/src/benchmark.py +++ b/src/benchmark.py @@ -475,14 +475,16 @@ class Benchmark: result = {} - if res.returncode != 0 or "ERROR: ld.so" in res.stderr: + if res.returncode != 0 or "ERROR: ld.so" in res.stderr or "Segmentation fault" in res.stderr or "Aborted" in res.stderr: print() print_debug("Stdout:\n" + res.stdout) print_debug("Stderr:\n" + res.stderr) if res.returncode != 0: - print_error("{} failed with exit code {} for {}".format(argv, res.returncode, alloc_name)) + print_error(f"{argv} failed with exit code {res.returncode} for {alloc_name}") elif "ERROR: ld.so" in res.stderr: - print_error("Preloading of {} failed for {}".format(alloc["LD_PRELOAD"], alloc_name)) + print_error(f"Preloading of {alloc['LD_PRELOAD']} failed for {alloc_name}") + else: + print_error(f"{argv} terminated abnormally") # parse and store results else: -- cgit v1.2.3