Remove blanket disabling of TSAN for peer_connection_integrationtests

and replace with specific compiler flags around the remaining failing
tests.

Bug: webrtc:3608, webrtc:11305, webrtc:11282
Change-Id: Iac45e52efcdfebc1bb85697a7606873255643e00
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206980
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33233}
This commit is contained in:
Harald Alvestrand
2021-02-11 10:47:22 +00:00
committed by Commit Bot
parent cc4743795b
commit ec23d6d64f

View File

@ -8,10 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
// Disable for TSan v2, see
// https://code.google.com/p/webrtc/issues/detail?id=1205 for details.
#if !defined(THREAD_SANITIZER)
#include <stdio.h>
#include <algorithm>
@ -3717,6 +3713,9 @@ TEST_P(PeerConnectionIntegrationTest,
EXPECT_FALSE(callee()->data_observer()->IsOpen());
}
#if !defined(THREAD_SANITIZER)
// This test provokes TSAN errors. See bugs.webrtc.org/11282
// Tests that data is buffered in an RTP data channel until an observer is
// registered for it.
//
@ -3763,6 +3762,8 @@ TEST_P(PeerConnectionIntegrationTestWithFakeClock,
FakeClock());
}
#endif // !defined(THREAD_SANITIZER)
// This test sets up a call between two parties with audio, video and but only
// the caller client supports RTP data channels.
TEST_P(PeerConnectionIntegrationTest, RtpDataChannelsRejectedByCallee) {
@ -4073,6 +4074,9 @@ TEST_P(PeerConnectionIntegrationTest, IceStatesReachCompletion) {
callee()->ice_connection_state(), kDefaultTimeout);
}
#if !defined(THREAD_SANITIZER)
// This test provokes TSAN errors. See bugs.webrtc.org/3608
constexpr int kOnlyLocalPorts = cricket::PORTALLOCATOR_DISABLE_STUN |
cricket::PORTALLOCATOR_DISABLE_RELAY |
cricket::PORTALLOCATOR_DISABLE_TCP;
@ -4133,6 +4137,8 @@ TEST_P(PeerConnectionIntegrationTest,
webrtc::kIceCandidatePairHostNameHostName));
}
#endif // !defined(THREAD_SANITIZER)
// Test that firewalling the ICE connection causes the clients to identify the
// disconnected state and then removing the firewall causes them to reconnect.
class PeerConnectionIntegrationIceStatesTest
@ -4201,6 +4207,9 @@ class PeerConnectionIntegrationIceStatesTestWithFakeClock
: public FakeClockForTest,
public PeerConnectionIntegrationIceStatesTest {};
#if !defined(THREAD_SANITIZER)
// This test provokes TSAN errors. bugs.webrtc.org/11282
// Tests that the PeerConnection goes through all the ICE gathering/connection
// states over the duration of the call. This includes Disconnected and Failed
// states, induced by putting a firewall between the peers and waiting for them
@ -4327,6 +4336,8 @@ TEST_P(PeerConnectionIntegrationIceStatesTestWithFakeClock,
kConsentTimeout, FakeClock());
}
#endif // !defined(THREAD_SANITIZER)
// Tests that the best connection is set to the appropriate IPv4/IPv6 connection
// and that the statistics in the metric observers are updated correctly.
TEST_P(PeerConnectionIntegrationIceStatesTest, VerifyBestConnection) {
@ -4683,6 +4694,9 @@ TEST_F(PeerConnectionIntegrationTestPlanB, CanSendRemoteVideoTrack) {
ASSERT_TRUE(ExpectNewFrames(media_expectations));
}
#if !defined(THREAD_SANITIZER)
// This test provokes TSAN errors. bugs.webrtc.org/11282
// Test that we achieve the expected end-to-end connection time, using a
// fake clock and simulated latency on the media and signaling paths.
// We use a TURN<->TURN connection because this is usually the quickest to
@ -4773,6 +4787,8 @@ TEST_P(PeerConnectionIntegrationTestWithFakeClock,
ClosePeerConnections();
}
#endif // !defined(THREAD_SANITIZER)
// Verify that a TurnCustomizer passed in through RTCConfiguration
// is actually used by the underlying TURN candidate pair.
// Note that turnport_unittest.cc contains more detailed, lower-level tests.
@ -5195,6 +5211,9 @@ TEST_P(PeerConnectionIntegrationTest, MediaFlowsWhenCandidatesSetOnlyInSdp) {
ASSERT_TRUE(ExpectNewFrames(media_expectations));
}
#if !defined(THREAD_SANITIZER)
// These tests provokes TSAN errors. See bugs.webrtc.org/11305.
// Test that SetAudioPlayout can be used to disable audio playout from the
// start, then later enable it. This may be useful, for example, if the caller
// needs to play a local ringtone until some event occurs, after which it
@ -5265,6 +5284,8 @@ TEST_P(PeerConnectionIntegrationTest,
EXPECT_TRUE_WAIT(GetAudioEnergyStat(caller()) > 0, kMaxWaitForFramesMs);
}
#endif // !defined(THREAD_SANITIZER)
// Test that SetAudioRecording can be used to disable audio recording from the
// start, then later enable it. This may be useful, for example, if the caller
// wants to ensure that no audio resources are active before a certain state
@ -6097,5 +6118,3 @@ TEST_F(PeerConnectionIntegrationTestUnifiedPlan,
} // namespace
} // namespace webrtc
#endif // if !defined(THREAD_SANITIZER)