diff options
author | Pavel Labath <labath@google.com> | 2017-04-19 10:13:22 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-04-19 10:13:22 +0000 |
commit | 107e694271b5b2679136de194f461c1b6c33463f (patch) | |
tree | b39334f192851936561e48467cf20fd3ee9bcfe7 /lldb/unittests/Host/SocketTest.cpp | |
parent | 742aed86833d23ad559c6437a0fc7ab47f3bbdf8 (diff) | |
download | llvm-107e694271b5b2679136de194f461c1b6c33463f.zip llvm-107e694271b5b2679136de194f461c1b6c33463f.tar.gz llvm-107e694271b5b2679136de194f461c1b6c33463f.tar.bz2 |
Revert yesterdays IPv6 patches
The break the linux bots (and probably any other machine which would
run the test suite in a massively parallel way). The problem is that it
can happen that we only successfully create an IPv6 listening socket
(because the relevant IPv4 port is used by another process) and then the
connecting side attempts to connect to the IPv4 port and fails.
It's not very obvious how to fix this problem, so I am reverting this
until we come up with a solution.
llvm-svn: 300669
Diffstat (limited to 'lldb/unittests/Host/SocketTest.cpp')
-rw-r--r-- | lldb/unittests/Host/SocketTest.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/lldb/unittests/Host/SocketTest.cpp b/lldb/unittests/Host/SocketTest.cpp index eda3a11..7abb010 100644 --- a/lldb/unittests/Host/SocketTest.cpp +++ b/lldb/unittests/Host/SocketTest.cpp @@ -44,7 +44,8 @@ protected: const char *listen_remote_address, bool child_processes_inherit, Socket **accept_socket, Error *error) { - *error = listen_socket->Accept(*accept_socket); + *error = listen_socket->Accept(listen_remote_address, + child_processes_inherit, *accept_socket); } template <typename SocketType> @@ -55,7 +56,7 @@ protected: bool child_processes_inherit = false; Error error; std::unique_ptr<SocketType> listen_socket_up( - new SocketType(true, child_processes_inherit)); + new SocketType(child_processes_inherit, error)); EXPECT_FALSE(error.Fail()); error = listen_socket_up->Listen(listen_remote_address, 5); EXPECT_FALSE(error.Fail()); @@ -69,7 +70,7 @@ protected: std::string connect_remote_address = get_connect_addr(*listen_socket_up); std::unique_ptr<SocketType> connect_socket_up( - new SocketType(true, child_processes_inherit)); + new SocketType(child_processes_inherit, error)); EXPECT_FALSE(error.Fail()); error = connect_socket_up->Connect(connect_remote_address); EXPECT_FALSE(error.Fail()); @@ -140,20 +141,6 @@ TEST_F(SocketTest, DecodeHostAndPort) { EXPECT_STREQ("65535", port_str.c_str()); EXPECT_EQ(65535, port); EXPECT_TRUE(error.Success()); - - EXPECT_TRUE( - Socket::DecodeHostAndPort("[::1]:12345", host_str, port_str, port, &error)); - EXPECT_STREQ("::1", host_str.c_str()); - EXPECT_STREQ("12345", port_str.c_str()); - EXPECT_EQ(12345, port); - EXPECT_TRUE(error.Success()); - - EXPECT_TRUE( - Socket::DecodeHostAndPort("[abcd:12fg:AF58::1]:12345", host_str, port_str, port, &error)); - EXPECT_STREQ("abcd:12fg:AF58::1", host_str.c_str()); - EXPECT_STREQ("12345", port_str.c_str()); - EXPECT_EQ(12345, port); - EXPECT_TRUE(error.Success()); } #ifndef LLDB_DISABLE_POSIX |