From 0665dce1163317390adbed9394cce2b1325ddb6c Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Sat, 21 Sep 2019 17:22:02 +0430 Subject: [PATCH] [fuzzer] Don't process output in debug mode as it causes timeout --- test/fuzzing/run-shape-fuzzer-tests.py | 7 ++++++- test/fuzzing/run-subset-fuzzer-tests.py | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/fuzzing/run-shape-fuzzer-tests.py b/test/fuzzing/run-shape-fuzzer-tests.py index 6d36c2cfe..a2f8b5c97 100755 --- a/test/fuzzing/run-shape-fuzzer-tests.py +++ b/test/fuzzing/run-shape-fuzzer-tests.py @@ -39,7 +39,12 @@ def cmd (command): timer.start() p.wait () tempf.seek (0) - text = tempf.read ().decode ("utf-8").strip () + text = tempf.read () + + #TODO: Detect debug mode with a better way + is_debug_mode = b"SANITIZE" in text + + text = "" if is_debug_mode else text.decode ("utf-8").strip () returncode = p.returncode finally: timer.cancel() diff --git a/test/fuzzing/run-subset-fuzzer-tests.py b/test/fuzzing/run-subset-fuzzer-tests.py index 820519f09..297398ce3 100755 --- a/test/fuzzing/run-subset-fuzzer-tests.py +++ b/test/fuzzing/run-subset-fuzzer-tests.py @@ -39,7 +39,12 @@ def cmd(command): timer.start() p.wait () tempf.seek (0) - text = tempf.read().decode ("utf-8").strip () + text = tempf.read () + + #TODO: Detect debug mode with a better way + is_debug_mode = b"SANITIZE" in text + + text = "" if is_debug_mode else text.decode ("utf-8").strip () returncode = p.returncode finally: timer.cancel()