提交 7b27d00f 编写于 作者: R Rudá Moura

Merge pull request #586 from clebergnu/gdb_revert_server_stderr

Revert "GDB: use gdbserver --server-sdtderr option if available"
......@@ -24,7 +24,6 @@ import time
import fcntl
import socket
import tempfile
import commands
try:
import subprocess32 as subprocess
......@@ -619,17 +618,6 @@ class GDBServer(object):
args = [self.path]
args += self.REQUIRED_ARGS
# The output on stderr generated by gdbserver itself is of no use to
# avocado. Quite on the contrary, it gets mixed with the "inferior"
# process stderr. Support is being added to gdbserver to send its own
# stderr output somewhere else. If available, use it.
output = commands.getoutput("%s --help" % self.path)
if '--server-stderr=' in output:
self.redirected_stderr = True
args.append('--server-stderr=/dev/null')
else:
self.redirected_stderr = False
if port is None:
self.port = network.find_free_port(*self.PORT_RANGE)
else:
......
......@@ -353,23 +353,6 @@ class GdbTest(test.Test):
listening_line = "Listening on port %s\n" % s.port
self.assertIn(listening_line, stderr_lines)
def test_server_stderr_redirected(self):
s = gdb.GDBServer()
if not s.redirected_stderr:
s.exit()
return
self.log.info('Testing server stderr redirection')
c = gdb.GDB()
c.connect(s.port)
c.set_file(self.return99_binary_path)
c.run()
s.exit()
# only thing in stderr should be the output generated by return99
stderr = open(s.stderr_path, 'r').read()
self.assertEqual("testing output to stderr\n", stderr)
def test_server_stdout(self):
self.log.info('Testing server stdout/stderr collection')
s = gdb.GDBServer()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册