diff options
author | Johnny Chen <johnny.chen@apple.com> | 2012-01-12 00:29:46 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2012-01-12 00:29:46 +0000 |
commit | 5886fb5bd361bafa04aeb5ff8a278948de8e14f5 (patch) | |
tree | d9874be1a451762b4aac3d59393498dd27a9b25a /lldb/test/python_api | |
parent | 4f8cb1e83a0f17d17aac25bb041d195d158bd08b (diff) | |
download | bcm5719-llvm-5886fb5bd361bafa04aeb5ff8a278948de8e14f5.tar.gz bcm5719-llvm-5886fb5bd361bafa04aeb5ff8a278948de8e14f5.zip |
rdar://problem/10492827
SBProcess.GetSTDERR() not getting stderr of the launched process
Since we are launch the inferior with:
process = target.LaunchSimple(None, None, os.getcwd())
i.e., without specifying stdin/out/err. A pseudo terminal is used for
handling the process I/O, and we are satisfied once the expected output
appears in process.GetSTDOUT().
llvm-svn: 147983
Diffstat (limited to 'lldb/test/python_api')
-rw-r--r-- | lldb/test/python_api/process/io/TestProcessIO.py | 6 | ||||
-rw-r--r-- | lldb/test/python_api/process/io/main.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lldb/test/python_api/process/io/TestProcessIO.py b/lldb/test/python_api/process/io/TestProcessIO.py index 8c494d15174..d99632f98bb 100644 --- a/lldb/test/python_api/process/io/TestProcessIO.py +++ b/lldb/test/python_api/process/io/TestProcessIO.py @@ -49,10 +49,10 @@ class ProcessIOTestCase(TestBase): error = process.GetSTDERR(500) if self.TraceOn(): print "output->|%s|" % output - print "error->|%s|" % error - # We are satisfied once "input line=>1" appears in stderr. + # Since we launched the process without specifying stdin/out/err, + # a pseudo terminal is used for stdout/err, and we are satisfied + # once "input line=>1" appears in stdout. # See also main.c. - #if "input line=>1" in error: if "input line=>1" in output: return time.sleep(5) diff --git a/lldb/test/python_api/process/io/main.c b/lldb/test/python_api/process/io/main.c index a3d95fe12af..fdf9effc235 100644 --- a/lldb/test/python_api/process/io/main.c +++ b/lldb/test/python_api/process/io/main.c @@ -6,6 +6,8 @@ int main(int argc, char const *argv[]) { int count = 1; while (fgets(line, sizeof(line), stdin)) { // Reading from stdin... fprintf(stderr, "input line=>%d\n", count++); + if (count > 3) + break; } printf("Exiting now\n"); |