From d3e765e4eb4af8eba0c63b6bfe2e17a12dc670dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Thu, 23 Mar 2023 18:24:55 +0100 Subject: [PATCH] Disable flaky PeerConnectionSimulcastWithMediaFlowTests on ASAN. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test is flaking during shutdown in general, but this is especially apparent on ASAN bots that don't retry. It is related to heap-use-after-free and is believef to be a test-only problem. Bug: webrtc:15018 Change-Id: I593c18dbbe45605404b17af74fd7101f118db7bb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299003 Commit-Queue: Henrik Boström Reviewed-by: Jeremy Leconte Cr-Commit-Position: refs/heads/main@{#39661} --- pc/peer_connection_simulcast_unittest.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pc/peer_connection_simulcast_unittest.cc b/pc/peer_connection_simulcast_unittest.cc index 27896a8889..92c0eba008 100644 --- a/pc/peer_connection_simulcast_unittest.cc +++ b/pc/peer_connection_simulcast_unittest.cc @@ -168,7 +168,11 @@ const webrtc::RTCOutboundRtpStreamStats* FindOutboundRtpByRid( namespace webrtc { constexpr TimeDelta kDefaultTimeout = TimeDelta::Seconds(5); + +// Only used by tests disabled under ASAN, avoids unsued variable compile error. +#if !defined(ADDRESS_SANITIZER) constexpr TimeDelta kLongTimeoutForRampingUp = TimeDelta::Seconds(30); +#endif // !defined(ADDRESS_SANITIZER) class PeerConnectionSimulcastTests : public ::testing::Test { public: @@ -1137,6 +1141,12 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_THAT(*outbound_rtps[0]->scalability_mode, StrEq("L1T1")); } +// TODO(https://crbug.com/webrtc/15018): Investigate heap-use-after free during +// shutdown of the test that is flakily happening on bots. It's not only +// happening on ASAN, but it is rare enough on non-ASAN that we don't have to +// disable everywhere. +#if !defined(ADDRESS_SANITIZER) + TEST_F(PeerConnectionSimulcastWithMediaFlowTests, SendingThreeEncodings_VP8_Simulcast) { rtc::scoped_refptr local_pc_wrapper = CreatePc(); @@ -1622,4 +1632,6 @@ TEST_F(PeerConnectionSimulcastWithMediaFlowTests, EXPECT_THAT(*outbound_rtps[2]->scalability_mode, StrEq("L1T3")); } +#endif // !defined(ADDRESS_SANITIZER) + } // namespace webrtc