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)
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)
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits