[Lldb-commits] [PATCH] D52139: [lldb-mi] Fix hanging of target-select-so-path.test
Alexander Polyakov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 20 08:00:50 PDT 2018
apolyakov updated this revision to Diff 166290.
apolyakov retitled this revision from "[lldb-mi] Improve lldb-mi LIT tests" to "[lldb-mi] Fix hanging of target-select-so-path.test".
apolyakov edited the summary of this revision.
apolyakov added a comment.
I found out that the reason of hanging of the test suite was in incorrect usage of Filecheck and lldb-mi processes in target-select-so-path.test. Current patch has been tested on CentOS 7.
https://reviews.llvm.org/D52139
Files:
lit/tools/lldb-mi/target/inputs/target-select-so-path.py
Index: lit/tools/lldb-mi/target/inputs/target-select-so-path.py
===================================================================
--- lit/tools/lldb-mi/target/inputs/target-select-so-path.py
+++ lit/tools/lldb-mi/target/inputs/target-select-so-path.py
@@ -19,7 +19,7 @@
debugserver_proc = subprocess.Popen(debugserver.split())
lldbmi_proc = subprocess.Popen(lldbmi, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, shell=True)
-filecheck_proc = subprocess.Popen(filecheck, stdin=lldbmi_proc.stdout,
+filecheck_proc = subprocess.Popen(filecheck, stdin=subprocess.PIPE,
shell=True)
# Get a tcp port chosen by debugserver.
@@ -32,8 +32,8 @@
# Replace '$PORT' with a free port number and pass
# test's content to lldb-mi.
lldbmi_proc.stdin.write(f.read().replace('$PORT', port))
- lldbmi_proc.wait()
- filecheck_proc.wait()
+ out, err = lldbmi_proc.communicate()
+ filecheck_proc.stdin.write(out)
debugserver_proc.kill()
exit(filecheck_proc.returncode)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52139.166290.patch
Type: text/x-patch
Size: 1052 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180920/b8aa87a5/attachment.bin>
More information about the lldb-commits
mailing list