Skip to content

Commit

Permalink
fuzz: Fix test_runner error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Dec 13, 2024
1 parent 78f1bff commit fa0e30b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/fuzz/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,19 +371,19 @@ def job(t, args):
for future in as_completed(jobs):
output, result, target = future.result()
logging.debug(output)
if using_libfuzzer:
done_stat = [l for l in output.splitlines() if "DONE" in l]
assert len(done_stat) == 1
stats.append((target, done_stat[0]))
try:
result.check_returncode()
except subprocess.CalledProcessError as e:
if e.stdout:
logging.info(e.stdout)
if e.stderr:
logging.info(e.stderr)
logging.info(f"Target {result.args} failed with exit code {e.returncode}")
logging.info(f"⚠️ Failure generated from target with exit code {e.returncode}: {result.args}")
sys.exit(1)
if using_libfuzzer:
done_stat = [l for l in output.splitlines() if "DONE" in l]
assert len(done_stat) == 1
stats.append((target, done_stat[0]))

if using_libfuzzer:
print("Summary:")
Expand Down

0 comments on commit fa0e30b

Please sign in to comment.