From e6fd1cc3f4c2c8b4592ad0efde3c3943687d6e1c Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 18 Sep 2026 16:24:08 -0700 Subject: [PATCH] Update monitor_fuzz.py return codes Return 1 instead of 0 when a bug is found to distinguish it from the case when --max-iters is reached. Return 2 in the case of other errors. This change lets this helpful bash one-liner work correctly: ```bash while (git pull origin main && ninja && ./scripts/monitor_fuzz.py -j --max-iters=1000000); do :; done ``` --- scripts/monitor_fuzz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/monitor_fuzz.py b/scripts/monitor_fuzz.py index 2b0113c3c9e..40b088ebd5a 100755 --- a/scripts/monitor_fuzz.py +++ b/scripts/monitor_fuzz.py @@ -364,7 +364,7 @@ def signal_handler(signum, _frame): print(f'Iteration: {iteration}') print(f'Seed: {seed}') print(f'Exit code: {w.proc.returncode}') - return 0 + return 1 if limit_reached: print( @@ -385,7 +385,7 @@ def signal_handler(signum, _frame): print('Last 20 lines of log:') for line in recent_lines: print(line.rstrip('\r\n')) - return 1 + return 2 if __name__ == '__main__':