From 14aa26bbb5a0cc69be701f1d1a90f610c57eeef7 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 10 Jan 2014 22:21:12 +0000 Subject: [PATCH] Fixed the connect remote test. llvm-svn: 198961 --- lldb/test/functionalities/connect_remote/EchoServer.py | 10 +++++++--- .../connect_remote/TestConnectRemote.py | 5 +---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lldb/test/functionalities/connect_remote/EchoServer.py b/lldb/test/functionalities/connect_remote/EchoServer.py index d3ae0fa95724..3e6823c89d42 100755 --- a/lldb/test/functionalities/connect_remote/EchoServer.py +++ b/lldb/test/functionalities/connect_remote/EchoServer.py @@ -17,7 +17,11 @@ conn, addr = s.accept() print 'Connected by', addr while 1: data = conn.recv(1024) - if not data: break - conn.send(data) - print 'Received:', data + if data: + print 'Received:', data + # Don't response to acks that are sent to us + if data != '+': + conn.send("+$#00") + else: + break conn.close() diff --git a/lldb/test/functionalities/connect_remote/TestConnectRemote.py b/lldb/test/functionalities/connect_remote/TestConnectRemote.py index 65895f18b374..f741b576e48c 100644 --- a/lldb/test/functionalities/connect_remote/TestConnectRemote.py +++ b/lldb/test/functionalities/connect_remote/TestConnectRemote.py @@ -32,10 +32,7 @@ class ConnectRemoteTestCase(TestBase): fakeserver.expect_exact('Listening on localhost:12345') # Connect to the fake server.... - if sys.platform.startswith('freebsd') or sys.platform.startswith("linux"): - self.runCmd("process connect -p gdb-remote connect://localhost:12345") - else: - self.runCmd("process connect connect://localhost:12345") + self.runCmd("process connect -p gdb-remote connect://localhost:12345") if __name__ == '__main__':