tests: increase the timeout for the subprocess to receive the quit signal
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>
Wed, 7 Aug 2019 10:11:30 +0000 (12:11 +0200)
committerBenjamin Tissoires <benjamin.tissoires@gmail.com>
Wed, 7 Aug 2019 12:28:22 +0000 (14:28 +0200)
On a very loaded machine, the process might not receive the quit signal
in a timely manner, and this introduce false positive results.

Add a longer timeout. This shouldn't interfere with the global time
spent in the tests, but will allow some loaded environment to pass
the tests.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
tools/test-tool-option-parsing.py

index bdfe99b..d5fbbd5 100755 (executable)
@@ -43,7 +43,7 @@ def run_command(args):
             p.wait(0.7)
         except subprocess.TimeoutExpired:
             p.send_signal(3)  # SIGQUIT
-        stdout, stderr = p.communicate(timeout=2)
+        stdout, stderr = p.communicate(timeout=5)
         if p.returncode == -3:
             p.returncode = 0
         return p.returncode, stdout.decode('UTF-8'), stderr.decode('UTF-8')