Disable G722 and iLBC tests failing with the new version of UBSan.
Bug: webrtc:345525069
Change-Id: Iebe6a75252393f2bdf1e91b309f1b918708d413c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353860
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42443}
diff --git a/modules/audio_coding/test/EncodeDecodeTest.cc b/modules/audio_coding/test/EncodeDecodeTest.cc
index ef997f1..c51ad37 100644
--- a/modules/audio_coding/test/EncodeDecodeTest.cc
+++ b/modules/audio_coding/test/EncodeDecodeTest.cc
@@ -234,10 +234,14 @@
{107, {"L16", 8000, 1}}, {108, {"L16", 16000, 1}},
{109, {"L16", 32000, 1}}, {0, {"PCMU", 8000, 1}},
{8, {"PCMA", 8000, 1}},
+// TODO(bugs.webrtc.org/345525069): Either fix/enable or remove G722 and iLBC.
+#if defined(__has_feature) && !__has_feature(undefined_behavior_sanitizer)
#ifdef WEBRTC_CODEC_ILBC
{102, {"ILBC", 8000, 1}},
#endif
- {9, {"G722", 8000, 1}}};
+ {9, {"G722", 8000, 1}},
+#endif
+ };
int file_num = 0;
for (const auto& send_codec : send_codecs) {
RTPFile rtpFile;
diff --git a/modules/audio_coding/test/TestAllCodecs.cc b/modules/audio_coding/test/TestAllCodecs.cc
index 1a56fbc..9d9c317 100644
--- a/modules/audio_coding/test/TestAllCodecs.cc
+++ b/modules/audio_coding/test/TestAllCodecs.cc
@@ -152,6 +152,9 @@
// All codecs are tested for all allowed sampling frequencies, rates and
// packet sizes.
+
+// TODO(bugs.webrtc.org/345525069): Either fix/enable or remove G722.
+#if defined(__has_feature) && !__has_feature(undefined_behavior_sanitizer)
test_count_++;
OpenOutFile(test_count_);
char codec_g722[] = "G722";
@@ -168,6 +171,9 @@
RegisterSendCodec(codec_g722, 16000, 64000, 960, 0);
Run(channel_a_to_b_);
outfile_b_.Close();
+#endif
+// TODO(bugs.webrtc.org/345525069): Either fix/enable or remove iLBC.
+#if defined(__has_feature) && !__has_feature(undefined_behavior_sanitizer)
#ifdef WEBRTC_CODEC_ILBC
test_count_++;
OpenOutFile(test_count_);
@@ -182,6 +188,7 @@
Run(channel_a_to_b_);
outfile_b_.Close();
#endif
+#endif
test_count_++;
OpenOutFile(test_count_);
char codec_l16[] = "L16";
diff --git a/modules/audio_coding/test/TestRedFec.cc b/modules/audio_coding/test/TestRedFec.cc
index f8acf48..83e5d61 100644
--- a/modules/audio_coding/test/TestRedFec.cc
+++ b/modules/audio_coding/test/TestRedFec.cc
@@ -77,6 +77,8 @@
Run();
_outFileB.Close();
+// TODO(bugs.webrtc.org/345525069): Either fix/enable or remove G722.
+#if defined(__has_feature) && !__has_feature(undefined_behavior_sanitizer)
// Switch to a 16 kHz codec; RED should be switched off.
RegisterSendCodec(_acmA, {"G722", 8000, 1}, Vad::kVadAggressive, false);
@@ -96,6 +98,7 @@
OpenOutFile(_testCntr);
Run();
_outFileB.Close();
+#endif
RegisterSendCodec(_acmA, {"opus", 48000, 2}, absl::nullopt, false);
diff --git a/modules/audio_coding/test/TestStereo.cc b/modules/audio_coding/test/TestStereo.cc
index 4573a7e..cf1f913 100644
--- a/modules/audio_coding/test/TestStereo.cc
+++ b/modules/audio_coding/test/TestStereo.cc
@@ -170,6 +170,8 @@
audio_channels = 2;
codec_channels = 2;
+// TODO(bugs.webrtc.org/345525069): Either fix/enable or remove G722.
+#if defined(__has_feature) && !__has_feature(undefined_behavior_sanitizer)
// All codecs are tested for all allowed sampling frequencies, rates and
// packet sizes.
channel_a2b_->set_codec_mode(kStereo);
@@ -189,6 +191,7 @@
RegisterSendCodec('A', codec_g722, 16000, 64000, 960, codec_channels);
Run(channel_a2b_, audio_channels, codec_channels);
out_file_.Close();
+#endif
channel_a2b_->set_codec_mode(kStereo);
test_cntr_++;
@@ -294,12 +297,15 @@
audio_channels = 1;
codec_channels = 2;
+// TODO(bugs.webrtc.org/345525069): Either fix/enable or remove G722.
+#if defined(__has_feature) && !__has_feature(undefined_behavior_sanitizer)
test_cntr_++;
channel_a2b_->set_codec_mode(kStereo);
OpenOutFile(test_cntr_);
RegisterSendCodec('A', codec_g722, 16000, 64000, 160, codec_channels);
Run(channel_a2b_, audio_channels, codec_channels);
out_file_.Close();
+#endif
test_cntr_++;
channel_a2b_->set_codec_mode(kStereo);
@@ -350,12 +356,15 @@
codec_channels = 1;
channel_a2b_->set_codec_mode(kMono);
+// TODO(bugs.webrtc.org/345525069): Either fix/enable or remove G722.
+#if defined(__has_feature) && !__has_feature(undefined_behavior_sanitizer)
// Run stereo audio and mono codec.
test_cntr_++;
OpenOutFile(test_cntr_);
RegisterSendCodec('A', codec_g722, 16000, 64000, 160, codec_channels);
Run(channel_a2b_, audio_channels, codec_channels);
out_file_.Close();
+#endif
test_cntr_++;
OpenOutFile(test_cntr_);
diff --git a/modules/audio_coding/test/TestVADDTX.cc b/modules/audio_coding/test/TestVADDTX.cc
index 1789efd..d6595c0 100644
--- a/modules/audio_coding/test/TestVADDTX.cc
+++ b/modules/audio_coding/test/TestVADDTX.cc
@@ -177,7 +177,10 @@
TestWebRtcVadDtx::TestWebRtcVadDtx() : output_file_num_(0) {}
void TestWebRtcVadDtx::Perform() {
+// TODO(bugs.webrtc.org/345525069): Either fix/enable or remove iLBC.
+#if defined(__has_feature) && !__has_feature(undefined_behavior_sanitizer)
RunTestCases({"ILBC", 8000, 1});
+#endif
RunTestCases({"opus", 48000, 2});
}