From: Alex Ozdemir Date: Mon, 20 Jul 2020 20:21:06 +0000 (-0700) Subject: Fix a deadlock in the signature tests. (#4772) X-Git-Tag: cvc5-1.0.0~3085 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=614ad602bc1f895dad8eaa001a69a4211c5459d2;p=cvc5.git Fix a deadlock in the signature tests. (#4772) * wait() deadlocks if the OS pipe fills * communicate() does not This is essentially a duplicate of [this](https://github.com/CVC4/LFSC/pull/38). --- diff --git a/test/signatures/run_test.py b/test/signatures/run_test.py index ac14267e9..df612e20a 100755 --- a/test/signatures/run_test.py +++ b/test/signatures/run_test.py @@ -111,12 +111,11 @@ def main(): result = subprocess.Popen(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE) - code = result.wait() - if 0 != code: - stdout = result.stdout.read() + (stdout, _) = result.communicate() + if 0 != result.returncode: if stdout: print(stdout.decode()) - return code + return result.returncode if __name__ == '__main__':