JDevlieghere created this revision.
JDevlieghere added reviewers: labath, davide.
Herald added a project: LLDB.

When we upgraded pexpect to a more recent version, we experienced issues where 
pexpect was sending commands faster to LLDB could process. The problem was 
especially apparent on CI systems, where the high load caused LLDB to be 
inevitable more constrained. Usually the issue would go away when running the 
test by itself and would reappear when running multiple tests concurrently.

When we looked at this, the pexecpt implementation already contains a small 
timeout. Apparently that sometimes wasn't sufficient for LLDB.

Rather than adding timeouts in the affected tests, I would propose to just do 
it in lldbpexpect.py. It's definitely not the best solution, but it does solve 
the flakiness issues I'm investigating.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D60563

Files:
  lldb/packages/Python/lldbsuite/test/lldbpexpect.py


Index: lldb/packages/Python/lldbsuite/test/lldbpexpect.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbpexpect.py
+++ lldb/packages/Python/lldbsuite/test/lldbpexpect.py
@@ -4,6 +4,7 @@
 # System modules
 import os
 import sys
+import time
 
 # Third-party modules
 import six
@@ -46,6 +47,7 @@
                 timeout = self.timeout
             if exact is None:
                 exact = False
+            time.sleep(0.1) # Give LLDB time to process
             if exact:
                 return self.child.expect_exact(patterns, timeout=timeout)
             else:


Index: lldb/packages/Python/lldbsuite/test/lldbpexpect.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbpexpect.py
+++ lldb/packages/Python/lldbsuite/test/lldbpexpect.py
@@ -4,6 +4,7 @@
 # System modules
 import os
 import sys
+import time
 
 # Third-party modules
 import six
@@ -46,6 +47,7 @@
                 timeout = self.timeout
             if exact is None:
                 exact = False
+            time.sleep(0.1) # Give LLDB time to process
             if exact:
                 return self.child.expect_exact(patterns, timeout=timeout)
             else:
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PATCH] ... Jonas Devlieghere via Phabricator via lldb-commits

Reply via email to