| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace rtc { | 23 namespace rtc { |
| 24 | 24 |
| 25 class PhysicalSocketTest : public SocketTest { | 25 class PhysicalSocketTest : public SocketTest { |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 TEST_F(PhysicalSocketTest, TestConnectIPv4) { | 28 TEST_F(PhysicalSocketTest, TestConnectIPv4) { |
| 29 SocketTest::TestConnectIPv4(); | 29 SocketTest::TestConnectIPv4(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 TEST_F(PhysicalSocketTest, TestConnectIPv6) { | 32 // Crashes on Linux. See webrtc:4923. |
| 33 #if defined(WEBRTC_LINUX) |
| 34 #define MAYBE_TestConnectIPv6 DISABLED_TestConnectIPv6 |
| 35 #else |
| 36 #define MAYBE_TestConnectIPv6 TestConnectIPv6 |
| 37 #endif |
| 38 TEST_F(PhysicalSocketTest, MAYBE_TestConnectIPv6) { |
| 33 SocketTest::TestConnectIPv6(); | 39 SocketTest::TestConnectIPv6(); |
| 34 } | 40 } |
| 35 | 41 |
| 36 TEST_F(PhysicalSocketTest, TestConnectWithDnsLookupIPv4) { | 42 TEST_F(PhysicalSocketTest, TestConnectWithDnsLookupIPv4) { |
| 37 SocketTest::TestConnectWithDnsLookupIPv4(); | 43 SocketTest::TestConnectWithDnsLookupIPv4(); |
| 38 } | 44 } |
| 39 | 45 |
| 40 TEST_F(PhysicalSocketTest, TestConnectWithDnsLookupIPv6) { | 46 TEST_F(PhysicalSocketTest, TestConnectWithDnsLookupIPv6) { |
| 41 SocketTest::TestConnectWithDnsLookupIPv6(); | 47 SocketTest::TestConnectWithDnsLookupIPv6(); |
| 42 } | 48 } |
| 43 | 49 |
| 44 TEST_F(PhysicalSocketTest, TestConnectFailIPv4) { | 50 TEST_F(PhysicalSocketTest, TestConnectFailIPv4) { |
| 45 SocketTest::TestConnectFailIPv4(); | 51 SocketTest::TestConnectFailIPv4(); |
| 46 } | 52 } |
| 47 | 53 |
| 48 TEST_F(PhysicalSocketTest, TestConnectFailIPv6) { | 54 // Crashes on Linux. See webrtc:4923. |
| 55 #if defined(WEBRTC_LINUX) |
| 56 #define MAYBE_TestConnectFailIPv6 DISABLED_TestConnectFailIPv6 |
| 57 #else |
| 58 #define MAYBE_TestConnectFailIPv6 TestConnectFailIPv6 |
| 59 #endif |
| 60 TEST_F(PhysicalSocketTest, MAYBE_TestConnectFailIPv6) { |
| 49 SocketTest::TestConnectFailIPv6(); | 61 SocketTest::TestConnectFailIPv6(); |
| 50 } | 62 } |
| 51 | 63 |
| 52 TEST_F(PhysicalSocketTest, TestConnectWithDnsLookupFailIPv4) { | 64 TEST_F(PhysicalSocketTest, TestConnectWithDnsLookupFailIPv4) { |
| 53 SocketTest::TestConnectWithDnsLookupFailIPv4(); | 65 SocketTest::TestConnectWithDnsLookupFailIPv4(); |
| 54 } | 66 } |
| 55 | 67 |
| 56 | 68 // Crashes on Linux. See webrtc:4923. |
| 57 TEST_F(PhysicalSocketTest, TestConnectWithDnsLookupFailIPv6) { | 69 #if defined(WEBRTC_LINUX) |
| 70 #define MAYBE_TestConnectWithDnsLookupFailIPv6 \ |
| 71 DISABLED_TestConnectWithDnsLookupFailIPv6 |
| 72 #else |
| 73 #define MAYBE_TestConnectWithDnsLookupFailIPv6 \ |
| 74 TestConnectWithDnsLookupFailIPv6 |
| 75 #endif |
| 76 TEST_F(PhysicalSocketTest, MAYBE_TestConnectWithDnsLookupFailIPv6) { |
| 58 SocketTest::TestConnectWithDnsLookupFailIPv6(); | 77 SocketTest::TestConnectWithDnsLookupFailIPv6(); |
| 59 } | 78 } |
| 60 | 79 |
| 61 | 80 |
| 62 TEST_F(PhysicalSocketTest, TestConnectWithClosedSocketIPv4) { | 81 TEST_F(PhysicalSocketTest, TestConnectWithClosedSocketIPv4) { |
| 63 SocketTest::TestConnectWithClosedSocketIPv4(); | 82 SocketTest::TestConnectWithClosedSocketIPv4(); |
| 64 } | 83 } |
| 65 | 84 |
| 66 TEST_F(PhysicalSocketTest, TestConnectWithClosedSocketIPv6) { | 85 // Crashes on Linux. See webrtc:4923. |
| 86 #if defined(WEBRTC_LINUX) |
| 87 #define MAYBE_TestConnectWithClosedSocketIPv6 \ |
| 88 DISABLED_TestConnectWithClosedSocketIPv6 |
| 89 #else |
| 90 #define MAYBE_TestConnectWithClosedSocketIPv6 TestConnectWithClosedSocketIPv6 |
| 91 #endif |
| 92 TEST_F(PhysicalSocketTest, MAYBE_TestConnectWithClosedSocketIPv6) { |
| 67 SocketTest::TestConnectWithClosedSocketIPv6(); | 93 SocketTest::TestConnectWithClosedSocketIPv6(); |
| 68 } | 94 } |
| 69 | 95 |
| 70 TEST_F(PhysicalSocketTest, TestConnectWhileNotClosedIPv4) { | 96 TEST_F(PhysicalSocketTest, TestConnectWhileNotClosedIPv4) { |
| 71 SocketTest::TestConnectWhileNotClosedIPv4(); | 97 SocketTest::TestConnectWhileNotClosedIPv4(); |
| 72 } | 98 } |
| 73 | 99 |
| 74 TEST_F(PhysicalSocketTest, TestConnectWhileNotClosedIPv6) { | 100 // Crashes on Linux. See webrtc:4923. |
| 101 #if defined(WEBRTC_LINUX) |
| 102 #define MAYBE_TestConnectWhileNotClosedIPv6 \ |
| 103 DISABLED_TestConnectWhileNotClosedIPv6 |
| 104 #else |
| 105 #define MAYBE_TestConnectWhileNotClosedIPv6 TestConnectWhileNotClosedIPv6 |
| 106 #endif |
| 107 TEST_F(PhysicalSocketTest, MAYBE_TestConnectWhileNotClosedIPv6) { |
| 75 SocketTest::TestConnectWhileNotClosedIPv6(); | 108 SocketTest::TestConnectWhileNotClosedIPv6(); |
| 76 } | 109 } |
| 77 | 110 |
| 78 TEST_F(PhysicalSocketTest, TestServerCloseDuringConnectIPv4) { | 111 TEST_F(PhysicalSocketTest, TestServerCloseDuringConnectIPv4) { |
| 79 SocketTest::TestServerCloseDuringConnectIPv4(); | 112 SocketTest::TestServerCloseDuringConnectIPv4(); |
| 80 } | 113 } |
| 81 | 114 |
| 82 TEST_F(PhysicalSocketTest, TestServerCloseDuringConnectIPv6) { | 115 // Crashes on Linux. See webrtc:4923. |
| 116 #if defined(WEBRTC_LINUX) |
| 117 #define MAYBE_TestServerCloseDuringConnectIPv6 \ |
| 118 DISABLED_TestServerCloseDuringConnectIPv6 |
| 119 #else |
| 120 #define MAYBE_TestServerCloseDuringConnectIPv6 TestServerCloseDuringConnectIPv6 |
| 121 #endif |
| 122 TEST_F(PhysicalSocketTest, MAYBE_TestServerCloseDuringConnectIPv6) { |
| 83 SocketTest::TestServerCloseDuringConnectIPv6(); | 123 SocketTest::TestServerCloseDuringConnectIPv6(); |
| 84 } | 124 } |
| 85 | 125 |
| 86 TEST_F(PhysicalSocketTest, TestClientCloseDuringConnectIPv4) { | 126 TEST_F(PhysicalSocketTest, TestClientCloseDuringConnectIPv4) { |
| 87 SocketTest::TestClientCloseDuringConnectIPv4(); | 127 SocketTest::TestClientCloseDuringConnectIPv4(); |
| 88 } | 128 } |
| 89 | 129 |
| 90 TEST_F(PhysicalSocketTest, TestClientCloseDuringConnectIPv6) { | 130 // Crashes on Linux. See webrtc:4923. |
| 131 #if defined(WEBRTC_LINUX) |
| 132 #define MAYBE_TestClientCloseDuringConnectIPv6 \ |
| 133 DISABLED_TestClientCloseDuringConnectIPv6 |
| 134 #else |
| 135 #define MAYBE_TestClientCloseDuringConnectIPv6 TestClientCloseDuringConnectIPv6 |
| 136 #endif |
| 137 TEST_F(PhysicalSocketTest, MAYBE_TestClientCloseDuringConnectIPv6) { |
| 91 SocketTest::TestClientCloseDuringConnectIPv6(); | 138 SocketTest::TestClientCloseDuringConnectIPv6(); |
| 92 } | 139 } |
| 93 | 140 |
| 94 TEST_F(PhysicalSocketTest, TestServerCloseIPv4) { | 141 TEST_F(PhysicalSocketTest, TestServerCloseIPv4) { |
| 95 SocketTest::TestServerCloseIPv4(); | 142 SocketTest::TestServerCloseIPv4(); |
| 96 } | 143 } |
| 97 | 144 |
| 98 TEST_F(PhysicalSocketTest, TestServerCloseIPv6) { | 145 // Crashes on Linux. See webrtc:4923. |
| 146 #if defined(WEBRTC_LINUX) |
| 147 #define MAYBE_TestServerCloseIPv6 DISABLED_TestServerCloseIPv6 |
| 148 #else |
| 149 #define MAYBE_TestServerCloseIPv6 TestServerCloseIPv6 |
| 150 #endif |
| 151 TEST_F(PhysicalSocketTest, MAYBE_TestServerCloseIPv6) { |
| 99 SocketTest::TestServerCloseIPv6(); | 152 SocketTest::TestServerCloseIPv6(); |
| 100 } | 153 } |
| 101 | 154 |
| 102 TEST_F(PhysicalSocketTest, TestCloseInClosedCallbackIPv4) { | 155 TEST_F(PhysicalSocketTest, TestCloseInClosedCallbackIPv4) { |
| 103 SocketTest::TestCloseInClosedCallbackIPv4(); | 156 SocketTest::TestCloseInClosedCallbackIPv4(); |
| 104 } | 157 } |
| 105 | 158 |
| 106 TEST_F(PhysicalSocketTest, TestCloseInClosedCallbackIPv6) { | 159 // Crashes on Linux. See webrtc:4923. |
| 160 #if defined(WEBRTC_LINUX) |
| 161 #define MAYBE_TestCloseInClosedCallbackIPv6 \ |
| 162 DISABLED_TestCloseInClosedCallbackIPv6 |
| 163 #else |
| 164 #define MAYBE_TestCloseInClosedCallbackIPv6 TestCloseInClosedCallbackIPv6 |
| 165 #endif |
| 166 TEST_F(PhysicalSocketTest, MAYBE_TestCloseInClosedCallbackIPv6) { |
| 107 SocketTest::TestCloseInClosedCallbackIPv6(); | 167 SocketTest::TestCloseInClosedCallbackIPv6(); |
| 108 } | 168 } |
| 109 | 169 |
| 110 TEST_F(PhysicalSocketTest, TestSocketServerWaitIPv4) { | 170 TEST_F(PhysicalSocketTest, TestSocketServerWaitIPv4) { |
| 111 SocketTest::TestSocketServerWaitIPv4(); | 171 SocketTest::TestSocketServerWaitIPv4(); |
| 112 } | 172 } |
| 113 | 173 |
| 114 TEST_F(PhysicalSocketTest, TestSocketServerWaitIPv6) { | 174 // Crashes on Linux. See webrtc:4923. |
| 175 #if defined(WEBRTC_LINUX) |
| 176 #define MAYBE_TestSocketServerWaitIPv6 DISABLED_TestSocketServerWaitIPv6 |
| 177 #else |
| 178 #define MAYBE_TestSocketServerWaitIPv6 TestSocketServerWaitIPv6 |
| 179 #endif |
| 180 TEST_F(PhysicalSocketTest, MAYBE_TestSocketServerWaitIPv6) { |
| 115 SocketTest::TestSocketServerWaitIPv6(); | 181 SocketTest::TestSocketServerWaitIPv6(); |
| 116 } | 182 } |
| 117 | 183 |
| 118 TEST_F(PhysicalSocketTest, TestTcpIPv4) { | 184 TEST_F(PhysicalSocketTest, TestTcpIPv4) { |
| 119 SocketTest::TestTcpIPv4(); | 185 SocketTest::TestTcpIPv4(); |
| 120 } | 186 } |
| 121 | 187 |
| 122 TEST_F(PhysicalSocketTest, TestTcpIPv6) { | 188 // Crashes on Linux. See webrtc:4923. |
| 189 #if defined(WEBRTC_LINUX) |
| 190 #define MAYBE_TestTcpIPv6 DISABLED_TestTcpIPv6 |
| 191 #else |
| 192 #define MAYBE_TestTcpIPv6 TestTcpIPv6 |
| 193 #endif |
| 194 TEST_F(PhysicalSocketTest, MAYBE_TestTcpIPv6) { |
| 123 SocketTest::TestTcpIPv6(); | 195 SocketTest::TestTcpIPv6(); |
| 124 } | 196 } |
| 125 | 197 |
| 126 TEST_F(PhysicalSocketTest, TestUdpIPv4) { | 198 TEST_F(PhysicalSocketTest, TestUdpIPv4) { |
| 127 SocketTest::TestUdpIPv4(); | 199 SocketTest::TestUdpIPv4(); |
| 128 } | 200 } |
| 129 | 201 |
| 130 TEST_F(PhysicalSocketTest, TestUdpIPv6) { | 202 // Crashes on Linux. See webrtc:4923. |
| 203 #if defined(WEBRTC_LINUX) |
| 204 #define MAYBE_TestUdpIPv6 DISABLED_TestUdpIPv6 |
| 205 #else |
| 206 #define MAYBE_TestUdpIPv6 TestUdpIPv6 |
| 207 #endif |
| 208 TEST_F(PhysicalSocketTest, MAYBE_TestUdpIPv6) { |
| 131 SocketTest::TestUdpIPv6(); | 209 SocketTest::TestUdpIPv6(); |
| 132 } | 210 } |
| 133 | 211 |
| 134 // Disable for TSan v2, see | 212 // Disable for TSan v2, see |
| 135 // https://code.google.com/p/webrtc/issues/detail?id=3498 for details. | 213 // https://code.google.com/p/webrtc/issues/detail?id=3498 for details. |
| 136 #if !defined(THREAD_SANITIZER) | 214 #if !defined(THREAD_SANITIZER) |
| 137 | 215 |
| 138 TEST_F(PhysicalSocketTest, TestUdpReadyToSendIPv4) { | 216 TEST_F(PhysicalSocketTest, TestUdpReadyToSendIPv4) { |
| 139 SocketTest::TestUdpReadyToSendIPv4(); | 217 SocketTest::TestUdpReadyToSendIPv4(); |
| 140 } | 218 } |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 thread->Start(runnable.get()); | 350 thread->Start(runnable.get()); |
| 273 EXPECT_TRUE(ss_->Wait(1500, true)); | 351 EXPECT_TRUE(ss_->Wait(1500, true)); |
| 274 EXPECT_TRUE(ExpectSignal(SIGTERM)); | 352 EXPECT_TRUE(ExpectSignal(SIGTERM)); |
| 275 EXPECT_EQ(Thread::Current(), signaled_thread_); | 353 EXPECT_EQ(Thread::Current(), signaled_thread_); |
| 276 EXPECT_TRUE(ExpectNone()); | 354 EXPECT_TRUE(ExpectNone()); |
| 277 } | 355 } |
| 278 | 356 |
| 279 #endif | 357 #endif |
| 280 | 358 |
| 281 } // namespace rtc | 359 } // namespace rtc |
| OLD | NEW |