Revert of Enable socketservers unittests on windows (patchset #7 id:260001 of https://codereview.webrtc.org/2199193004/ )
Reason for revert: Win64 Debug seems to be broken because of this CL. https://build.chromium.org/p/client.webrtc/builders/Win64%20Debug The Win32SocketTest.TestGetSetOptionsIPv4 test is failing with [ RUN ] Win32SocketTest.TestGetSetOptionsIPv4 (win32socketserver.cc:299): GetRemoteAddress: unable to get remote addr, socket=672 (winping.cc:262): IcmpSendEcho(, 65507): 0 Full logs at https://build.chromium.org/p/client.webrtc/builders/Win64%20Debug/builds/8444/steps/webrtc_nonparallel_tests/logs/stdio I filed a bug at https://bugs.chromium.org/p/webrtc/issues/detail?id=6178 Original issue's description: > Enable socketservers unittests on windows. > failing tests disabling moved to ifdefs within the test files from build files. > > R=tommi@webrtc.org > > Committed: https://crrev.com/e51e11910faddb00921a8bb274f0d9374d55011f > Cr-Commit-Position: refs/heads/master@{#13623} TBR=tommi@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. Review-Url: https://codereview.webrtc.org/2209333002 Cr-Commit-Position: refs/heads/master@{#13642}
This commit is contained in:
@ -743,9 +743,6 @@ if (rtc_include_tests) {
|
||||
public_configs = [ ":common_inherited_config" ]
|
||||
sources = [
|
||||
"base/nullsocketserver_unittest.cc",
|
||||
"base/physicalsocketserver_unittest.cc",
|
||||
"base/socket_unittest.cc",
|
||||
"base/socket_unittest.h",
|
||||
"base/socketaddress_unittest.cc",
|
||||
"base/virtualsocket_unittest.cc",
|
||||
]
|
||||
@ -755,7 +752,17 @@ if (rtc_include_tests) {
|
||||
"//testing/gtest",
|
||||
]
|
||||
if (is_win) {
|
||||
sources += [ "base/win32socketserver_unittest.cc" ]
|
||||
# TODO(ronghuawu): Fix TestUdpReadyToSendIPv6 on windows bot then reenable
|
||||
# these tests.
|
||||
# sources += [ "base/win32socketserver_unittest.cc" ]
|
||||
} else {
|
||||
# TODO(pbos): Move test disabling to ifdefs within the test files instead
|
||||
# of here.
|
||||
sources += [
|
||||
"base/physicalsocketserver_unittest.cc",
|
||||
"base/socket_unittest.cc",
|
||||
"base/socket_unittest.h",
|
||||
]
|
||||
}
|
||||
if (is_android) {
|
||||
deps += [ "//testing/android/native_test:native_test_support" ]
|
||||
|
||||
@ -259,23 +259,11 @@ void PhysicalSocketTest::WritableAfterPartialWrite(const IPAddress& loopback) {
|
||||
TcpInternal(loopback, kDataSize, kMaxSendSize);
|
||||
}
|
||||
|
||||
// https://bugs.chromium.org/p/webrtc/issues/detail?id=6167
|
||||
#if defined(WEBRTC_WIN)
|
||||
#define MAYBE_TestWritableAfterPartialWriteIPv4 DISABLED_TestWritableAfterPartialWriteIPv4
|
||||
#else
|
||||
#define MAYBE_TestWritableAfterPartialWriteIPv4 TestWritableAfterPartialWriteIPv4
|
||||
#endif
|
||||
TEST_F(PhysicalSocketTest, MAYBE_TestWritableAfterPartialWriteIPv4) {
|
||||
TEST_F(PhysicalSocketTest, TestWritableAfterPartialWriteIPv4) {
|
||||
WritableAfterPartialWrite(kIPv4Loopback);
|
||||
}
|
||||
|
||||
// https://bugs.chromium.org/p/webrtc/issues/detail?id=6167
|
||||
#if defined(WEBRTC_WIN)
|
||||
#define MAYBE_TestWritableAfterPartialWriteIPv6 DISABLED_TestWritableAfterPartialWriteIPv6
|
||||
#else
|
||||
#define MAYBE_TestWritableAfterPartialWriteIPv6 TestWritableAfterPartialWriteIPv6
|
||||
#endif
|
||||
TEST_F(PhysicalSocketTest, MAYBE_TestWritableAfterPartialWriteIPv6) {
|
||||
TEST_F(PhysicalSocketTest, TestWritableAfterPartialWriteIPv6) {
|
||||
MAYBE_SKIP_IPV6;
|
||||
WritableAfterPartialWrite(kIPv6Loopback);
|
||||
}
|
||||
@ -384,13 +372,7 @@ TEST_F(PhysicalSocketTest, MAYBE_TestUdpReadyToSendIPv4) {
|
||||
SocketTest::TestUdpReadyToSendIPv4();
|
||||
}
|
||||
|
||||
// https://bugs.chromium.org/p/webrtc/issues/detail?id=6167
|
||||
#if defined(WEBRTC_WIN)
|
||||
#define MAYBE_TestUdpReadyToSendIPv6 DISABLED_TestUdpReadyToSendIPv6
|
||||
#else
|
||||
#define MAYBE_TestUdpReadyToSendIPv6 TestUdpReadyToSendIPv6
|
||||
#endif
|
||||
TEST_F(PhysicalSocketTest, MAYBE_TestUdpReadyToSendIPv6) {
|
||||
TEST_F(PhysicalSocketTest, TestUdpReadyToSendIPv6) {
|
||||
SocketTest::TestUdpReadyToSendIPv6();
|
||||
}
|
||||
|
||||
|
||||
@ -681,7 +681,7 @@ void SocketTest::SocketServerWaitInternal(const IPAddress& loopback) {
|
||||
}
|
||||
|
||||
void SocketTest::TcpInternal(const IPAddress& loopback, size_t data_size,
|
||||
ptrdiff_t max_send_size) {
|
||||
ssize_t max_send_size) {
|
||||
testing::StreamSink sink;
|
||||
SocketAddress accept_addr;
|
||||
|
||||
@ -719,7 +719,6 @@ void SocketTest::TcpInternal(const IPAddress& loopback, size_t data_size,
|
||||
char ch = static_cast<char>(i % 256);
|
||||
send_buffer.AppendData(&ch, sizeof(ch));
|
||||
}
|
||||
rtc::Buffer recved_data(0, data_size);
|
||||
|
||||
// Send and receive a bunch of data.
|
||||
size_t sent_size = 0;
|
||||
@ -742,7 +741,7 @@ void SocketTest::TcpInternal(const IPAddress& loopback, size_t data_size,
|
||||
EXPECT_LE(sent, unsent_size);
|
||||
sent_size += sent;
|
||||
if (max_send_size >= 0) {
|
||||
EXPECT_LE(static_cast<ptrdiff_t>(sent), max_send_size);
|
||||
EXPECT_LE(static_cast<ssize_t>(sent), max_send_size);
|
||||
if (sent < unsent_size) {
|
||||
// If max_send_size is limiting the amount to send per call such
|
||||
// that the sent amount is less than the unsent amount, we simulate
|
||||
@ -767,7 +766,8 @@ void SocketTest::TcpInternal(const IPAddress& loopback, size_t data_size,
|
||||
}
|
||||
|
||||
// Receive as much as we can get in a single recv call.
|
||||
int recved_size = receiver->Recv(recved_data.data(), data_size, nullptr);
|
||||
char recved_data[data_size];
|
||||
int recved_size = receiver->Recv(recved_data, data_size, nullptr);
|
||||
|
||||
if (!recv_called) {
|
||||
// The first Recv() after getting readability should succeed and receive
|
||||
@ -780,7 +780,7 @@ void SocketTest::TcpInternal(const IPAddress& loopback, size_t data_size,
|
||||
if (recved_size >= 0) {
|
||||
EXPECT_LE(static_cast<size_t>(recved_size),
|
||||
sent_size - recv_buffer.size());
|
||||
recv_buffer.AppendData(recved_data.data(), recved_size);
|
||||
recv_buffer.AppendData(recved_data, recved_size);
|
||||
} else {
|
||||
ASSERT_TRUE(receiver->IsBlocking());
|
||||
readable = false;
|
||||
@ -790,7 +790,7 @@ void SocketTest::TcpInternal(const IPAddress& loopback, size_t data_size,
|
||||
// Once all that we've sent has been received, expect to be able to send
|
||||
// again.
|
||||
if (!writable) {
|
||||
ASSERT_TRUE_WAIT(sink.Check(sender.get(), testing::SSE_WRITE),
|
||||
EXPECT_TRUE_WAIT(sink.Check(sender.get(), testing::SSE_WRITE),
|
||||
kTimeout);
|
||||
writable = true;
|
||||
send_called = false;
|
||||
|
||||
@ -65,7 +65,7 @@ class SocketTest : public testing::Test {
|
||||
|
||||
protected:
|
||||
void TcpInternal(const IPAddress& loopback, size_t data_size,
|
||||
ptrdiff_t max_send_size);
|
||||
ssize_t max_send_size);
|
||||
|
||||
private:
|
||||
void ConnectInternal(const IPAddress& loopback);
|
||||
|
||||
@ -30,8 +30,8 @@ TEST(Win32SocketServerTest, TestPump) {
|
||||
server.Pump();
|
||||
MSG msg;
|
||||
EXPECT_EQ(TRUE, PeekMessage(&msg, NULL, WM_USER, 0, PM_REMOVE));
|
||||
EXPECT_EQ(static_cast<UINT>(WM_USER), msg.message);
|
||||
EXPECT_EQ(999u, msg.wParam);
|
||||
EXPECT_EQ(WM_USER, msg.message);
|
||||
EXPECT_EQ(999, msg.wParam);
|
||||
}
|
||||
|
||||
// Test that Win32Socket passes all the generic Socket tests.
|
||||
|
||||
@ -471,9 +471,6 @@
|
||||
'type': '<(gtest_target_type)',
|
||||
'sources': [
|
||||
'base/nullsocketserver_unittest.cc',
|
||||
'base/physicalsocketserver_unittest.cc',
|
||||
'base/socket_unittest.cc',
|
||||
'base/socket_unittest.h',
|
||||
'base/socketaddress_unittest.cc',
|
||||
'base/virtualsocket_unittest.cc',
|
||||
],
|
||||
@ -493,7 +490,17 @@
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'sources': [
|
||||
'base/win32socketserver_unittest.cc',
|
||||
# TODO(ronghuawu): Fix TestUdpReadyToSendIPv6 on windows bot
|
||||
# then reenable these tests.
|
||||
# 'base/win32socketserver_unittest.cc',
|
||||
],
|
||||
}, {
|
||||
# TODO(pbos): Move test disabling to ifdefs within the test files
|
||||
# instead of here.
|
||||
'sources': [
|
||||
'base/physicalsocketserver_unittest.cc',
|
||||
'base/socket_unittest.cc',
|
||||
'base/socket_unittest.h',
|
||||
],
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
|
||||
Reference in New Issue
Block a user