Skip to content

Commit fa0e30b

Browse files
author
MarcoFalke
committed
fuzz: Fix test_runner error reporting
1 parent 78f1bff commit fa0e30b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/fuzz/test_runner.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -371,19 +371,19 @@ def job(t, args):
371371
for future in as_completed(jobs):
372372
output, result, target = future.result()
373373
logging.debug(output)
374-
if using_libfuzzer:
375-
done_stat = [l for l in output.splitlines() if "DONE" in l]
376-
assert len(done_stat) == 1
377-
stats.append((target, done_stat[0]))
378374
try:
379375
result.check_returncode()
380376
except subprocess.CalledProcessError as e:
381377
if e.stdout:
382378
logging.info(e.stdout)
383379
if e.stderr:
384380
logging.info(e.stderr)
385-
logging.info(f"Target {result.args} failed with exit code {e.returncode}")
381+
logging.info(f"⚠️ Failure generated from target with exit code {e.returncode}: {result.args}")
386382
sys.exit(1)
383+
if using_libfuzzer:
384+
done_stat = [l for l in output.splitlines() if "DONE" in l]
385+
assert len(done_stat) == 1
386+
stats.append((target, done_stat[0]))
387387

388388
if using_libfuzzer:
389389
print("Summary:")

0 commit comments

Comments
 (0)