From 635d365d49f05c3e2b892674e096818c540b907b Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Thu, 23 May 2024 13:45:31 -0700 Subject: [PATCH] deflake rtcp-rsize test in TSAN which is showing up too often in https://ci.chromium.org/ui/p/webrtc/builders/try/linux_tsan2 The actual failure seems to be around ice candidate destructors and what makes this test special is that it accessed local_description() which is now avoided. MsidSignalingInSubsequentOfferAnswer shows a similar usage but seems much less flaky. BUG=webrtc:340041654 Change-Id: Iba1369c62918c56b0904724f28109a7308cefee3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351565 Commit-Queue: Mirko Bonadei Reviewed-by: Harald Alvestrand Commit-Queue: Tomas Gunnarsson Reviewed-by: Tomas Gunnarsson Cr-Commit-Position: refs/heads/main@{#42384} --- pc/sdp_offer_answer_unittest.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pc/sdp_offer_answer_unittest.cc b/pc/sdp_offer_answer_unittest.cc index bef18154ee..1ee5215947 100644 --- a/pc/sdp_offer_answer_unittest.cc +++ b/pc/sdp_offer_answer_unittest.cc @@ -1368,13 +1368,14 @@ TEST_F(SdpOfferAnswerTest, ReducedSizeNotNegotiated) { auto audio_transceiver = caller->AddTransceiver(cricket::MEDIA_TYPE_AUDIO); auto video_transceiver = caller->AddTransceiver(cricket::MEDIA_TYPE_VIDEO); - EXPECT_TRUE(caller->CreateOfferAndSetAsLocal()); + auto offer = caller->CreateOfferAndSetAsLocal(); + ASSERT_NE(offer, nullptr); std::string sdp; - caller->pc()->local_description()->ToString(&sdp); + offer->ToString(&sdp); // Remove rtcp-rsize attribute. - auto offer = CreateSessionDescription( + auto modified_offer = CreateSessionDescription( SdpType::kOffer, absl::StrReplaceAll(sdp, {{"a=rtcp-rsize\r\n", ""}})); - EXPECT_TRUE(callee->SetRemoteDescription(std::move(offer))); + EXPECT_TRUE(callee->SetRemoteDescription(std::move(modified_offer))); auto answer = callee->CreateAnswerAndSetAsLocal(); EXPECT_TRUE(caller->SetRemoteDescription(std::move(answer)));