summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/unittests/Host/SocketTest.cpp4
-rw-r--r--lldb/unittests/tools/lldb-server/tests/TestClient.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/lldb/unittests/Host/SocketTest.cpp b/lldb/unittests/Host/SocketTest.cpp
index 09d62aa5841..9359764600a 100644
--- a/lldb/unittests/Host/SocketTest.cpp
+++ b/lldb/unittests/Host/SocketTest.cpp
@@ -179,7 +179,7 @@ TEST_F(SocketTest, TCPListen0ConnectAccept) {
[=](const TCPSocket &s) {
char connect_remote_address[64];
snprintf(connect_remote_address, sizeof(connect_remote_address),
- "localhost:%u", s.GetLocalPortNumber());
+ "127.0.0.1:%u", s.GetLocalPortNumber());
return std::string(connect_remote_address);
},
&socket_a_up, &socket_b_up);
@@ -193,7 +193,7 @@ TEST_F(SocketTest, TCPGetAddress) {
[=](const TCPSocket &s) {
char connect_remote_address[64];
snprintf(connect_remote_address, sizeof(connect_remote_address),
- "localhost:%u", s.GetLocalPortNumber());
+ "127.0.0.1:%u", s.GetLocalPortNumber());
return std::string(connect_remote_address);
},
&socket_a_up, &socket_b_up);
diff --git a/lldb/unittests/tools/lldb-server/tests/TestClient.cpp b/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
index ff75b07759f..67516a7196d 100644
--- a/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
+++ b/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
@@ -80,7 +80,7 @@ Expected<std::unique_ptr<TestClient>> TestClient::launchCustom(StringRef Log, Ar
return status.ToError();
args.AppendArgument(
- ("localhost:" + Twine(listen_socket.GetLocalPortNumber())).str());
+ ("127.0.0.1:" + Twine(listen_socket.GetLocalPortNumber())).str());
for (StringRef arg : ServerArgs)
args.AppendArgument(arg);
OpenPOWER on IntegriCloud