Fix FecTest.FlexfecTest flakiness caused by seq. num. wraparound.
The CL in https://codereview.webrtc.org/2918333002/ enabled FecTest.FlexfecTest and also added a sequence number offset between the FEC packets and the media packets. This was to simulate that the sequence numbers were generated from different spaces, i.e., that they belong to different SSRCs. The test does not account for sequence number wraparound, which means that it could fail when the sequence number offset realization was large. This CL fixes the problem by ensuring that the offset always lies in [0, 2^15]. This CL also fixes spelling of UlpfecTest. BUG=webrtc:7912 TESTED=ninja -C out/Debug && third_party/gtest-parallel/gtest-parallel --gtest_filter="*Flexfec*" -r 1000 out/Debug/modules_tests Review-Url: https://codereview.webrtc.org/2966753002 Cr-Commit-Position: refs/heads/master@{#18863}
This commit is contained in:
parent
697a590314
commit
fa8567868e
@ -135,7 +135,7 @@ void RunTest(bool use_flexfec) {
|
||||
uint16_t fec_seq_num_offset;
|
||||
if (use_flexfec) {
|
||||
fec_ssrc = random.Rand(1u, 0xfffffffe);
|
||||
fec_seq_num_offset = random.Rand<uint16_t>();
|
||||
fec_seq_num_offset = random.Rand(0, 1 << 15);
|
||||
} else {
|
||||
fec_ssrc = media_ssrc;
|
||||
fec_seq_num_offset = 0;
|
||||
@ -465,13 +465,13 @@ void RunTest(bool use_flexfec) {
|
||||
|
||||
// Too slow to finish before timeout on iOS. See webrtc:4755.
|
||||
#if defined(WEBRTC_IOS)
|
||||
#define MAYBE_UlpecTest DISABLED_UlpecTest
|
||||
#define MAYBE_UlpfecTest DISABLED_UlpfecTest
|
||||
#define MAYBE_FlexfecTest DISABLED_FlexfecTest
|
||||
#else
|
||||
#define MAYBE_UlpecTest UlpecTest
|
||||
#define MAYBE_UlpfecTest UlpfecTest
|
||||
#define MAYBE_FlexfecTest FlexfecTest
|
||||
#endif
|
||||
TEST(FecTest, MAYBE_UlpecTest) {
|
||||
TEST(FecTest, MAYBE_UlpfecTest) {
|
||||
RunTest(false);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user