Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_unittest.cc

Issue 1915813002: Disable failing modules_unittests for UBSan. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/audio_processing_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 size_t* payload_len) { 507 size_t* payload_len) {
508 rtp_info->header.sequenceNumber = frame_index; 508 rtp_info->header.sequenceNumber = frame_index;
509 rtp_info->header.timestamp = timestamp; 509 rtp_info->header.timestamp = timestamp;
510 rtp_info->header.ssrc = 0x1234; // Just an arbitrary SSRC. 510 rtp_info->header.ssrc = 0x1234; // Just an arbitrary SSRC.
511 rtp_info->header.payloadType = 98; // WB CNG. 511 rtp_info->header.payloadType = 98; // WB CNG.
512 rtp_info->header.markerBit = 0; 512 rtp_info->header.markerBit = 0;
513 payload[0] = 64; // Noise level -64 dBov, quite arbitrarily chosen. 513 payload[0] = 64; // Noise level -64 dBov, quite arbitrarily chosen.
514 *payload_len = 1; // Only noise level, no spectral parameters. 514 *payload_len = 1; // Only noise level, no spectral parameters.
515 } 515 }
516 516
517 // Disabled for UBSan: https://bugs.chromium.org/p/webrtc/issues/detail?id=5820
517 #if !defined(WEBRTC_IOS) && defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \ 518 #if !defined(WEBRTC_IOS) && defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \
518 (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ 519 (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
519 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) && \ 520 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) && \
520 !defined(WEBRTC_ARCH_ARM64) 521 !defined(WEBRTC_ARCH_ARM64) && !defined(UNDEFINED_SANITIZER)
521 #define MAYBE_TestBitExactness TestBitExactness 522 #define MAYBE_TestBitExactness TestBitExactness
522 #else 523 #else
523 #define MAYBE_TestBitExactness DISABLED_TestBitExactness 524 #define MAYBE_TestBitExactness DISABLED_TestBitExactness
524 #endif 525 #endif
525 TEST_F(NetEqDecodingTest, MAYBE_TestBitExactness) { 526 TEST_F(NetEqDecodingTest, MAYBE_TestBitExactness) {
526 const std::string input_rtp_file = 527 const std::string input_rtp_file =
527 webrtc::test::ResourcePath("audio_coding/neteq_universal_new", "rtp"); 528 webrtc::test::ResourcePath("audio_coding/neteq_universal_new", "rtp");
528 // Note that neteq4_universal_ref.pcm and neteq4_universal_ref_win_32.pcm 529 // Note that neteq4_universal_ref.pcm and neteq4_universal_ref_win_32.pcm
529 // are identical. The latter could have been removed, but if clients still 530 // are identical. The latter could have been removed, but if clients still
530 // have a copy of the file, the test will fail. 531 // have a copy of the file, the test will fail.
(...skipping 14 matching lines...) Expand all
545 if (FLAGS_gen_ref) { 546 if (FLAGS_gen_ref) {
546 DecodeAndCompare(input_rtp_file, "", "", ""); 547 DecodeAndCompare(input_rtp_file, "", "", "");
547 } else { 548 } else {
548 DecodeAndCompare(input_rtp_file, 549 DecodeAndCompare(input_rtp_file,
549 input_ref_file, 550 input_ref_file,
550 network_stat_ref_file, 551 network_stat_ref_file,
551 rtcp_stat_ref_file); 552 rtcp_stat_ref_file);
552 } 553 }
553 } 554 }
554 555
556 // Disabled for UBSan: https://bugs.chromium.org/p/webrtc/issues/detail?id=5820
555 #if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID) && \ 557 #if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID) && \
556 defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \ 558 defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \
557 defined(WEBRTC_CODEC_OPUS) 559 defined(WEBRTC_CODEC_OPUS) && !defined(UNDEFINED_SANITIZER)
558 #define MAYBE_TestOpusBitExactness TestOpusBitExactness 560 #define MAYBE_TestOpusBitExactness TestOpusBitExactness
559 #else 561 #else
560 #define MAYBE_TestOpusBitExactness DISABLED_TestOpusBitExactness 562 #define MAYBE_TestOpusBitExactness DISABLED_TestOpusBitExactness
561 #endif 563 #endif
562 TEST_F(NetEqDecodingTest, MAYBE_TestOpusBitExactness) { 564 TEST_F(NetEqDecodingTest, MAYBE_TestOpusBitExactness) {
563 const std::string input_rtp_file = 565 const std::string input_rtp_file =
564 webrtc::test::ResourcePath("audio_coding/neteq_opus", "rtp"); 566 webrtc::test::ResourcePath("audio_coding/neteq_opus", "rtp");
565 const std::string input_ref_file = 567 const std::string input_ref_file =
566 // The pcm files were generated by using Opus v1.1.2 to decode the RTC 568 // The pcm files were generated by using Opus v1.1.2 to decode the RTC
567 // file generated by Opus v1.1 569 // file generated by Opus v1.1
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 timestamp += kSamples; 1575 timestamp += kSamples;
1574 1576
1575 // Pull audio once. 1577 // Pull audio once.
1576 ASSERT_EQ(0, neteq_->GetAudio(&out_frame_)); 1578 ASSERT_EQ(0, neteq_->GetAudio(&out_frame_));
1577 ASSERT_EQ(kBlockSize16kHz, out_frame_.samples_per_channel_); 1579 ASSERT_EQ(kBlockSize16kHz, out_frame_.samples_per_channel_);
1578 } 1580 }
1579 // Verify speech output. 1581 // Verify speech output.
1580 EXPECT_EQ(AudioFrame::kNormalSpeech, out_frame_.speech_type_); 1582 EXPECT_EQ(AudioFrame::kNormalSpeech, out_frame_.speech_type_);
1581 } 1583 }
1582 } // namespace webrtc 1584 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/audio_processing_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698