[fuzzer] Don't process output in debug mode as it causes timeout

This commit is contained in:
Ebrahim Byagowi 2019-09-21 17:22:02 +04:30
parent dc886f6638
commit 0665dce116
2 changed files with 12 additions and 2 deletions

View File

@ -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()

View File

@ -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()