|
|
Created:
4 years, 3 months ago by hbos Modified:
4 years, 3 months ago Reviewers:
nisse-webrtc CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com Target Ref:
refs/pending/heads/master Project:
webrtc Visibility:
Public. |
DescriptionFix issues with rtc_stats_unittests tests so that they can run on bots.
This target is not run on bots so a couple of issues went under the
radar. If we expose the tests and run them on the bots[1] two issues are
surfaced which this CL fixes. After this CL lands we can enable this
target on the bots without it going red.
rtcstats_unittest.cc: Fix const char* string comparison issue by
comparing with strcmp instead of equality check.
rtcstatscollector_unittest.cc: Fix TSAN issue by constructing
ScopedFakeClock before spawning Threads.
[1] https://codereview.webrtc.org/2340443002/
BUG=chromium:627816
NOTRY=True
Committed: https://crrev.com/fdafab84bc9db9eabdf54b1186c27abfe871801a
Cr-Commit-Position: refs/heads/master@{#14215}
Patch Set 1 #
Total comments: 6
Patch Set 2 : Addressed comments #Patch Set 3 : Addressed comments #
Messages
Total messages: 22 (10 generated)
Patchset #1 (id:1) has been deleted
Description was changed from ========== Fix TSAN issue: Construct ScopedFakeClock before Threads BUG=chromium:627816 ========== to ========== Fix issues with rtc_stats_unittests tests so that they can run on bots. This target is not run on bots so a couple of issues went under the radar. If we expose the tests and run them on the bots[1] two issues are surfaced which this CL fixes. After this CL lands we can enable this target on the bots without it going red. rtcstats_unittest.cc: Fix const char* string comparison issue by comparing with strcmp instead of equality check. rtcstatscollector_unittest.cc: Fix TSAN issue by constructing ScopedFakeClock before spawning Threads. [1] https://codereview.webrtc.org/2340443002/ BUG=chromium:627816 ==========
hbos@webrtc.org changed reviewers: + nisse@webrtc.org
Please take a look, nisse.
https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... File webrtc/stats/rtcstats_unittest.cc (right): https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... webrtc/stats/rtcstats_unittest.cc:135: EXPECT_EQ(strcmp(*stats.m_static_string, "123"), 0); Makes me think: Do you really need stats using the type const char*? If all strings can be std::string, that would make things a little simpler. But that's perhaps best addressed in a different cl. https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... webrtc/stats/rtcstats_unittest.cc:142: EXPECT_EQ(*stats.m_sequence_static_string, std::vector<const char*>()); Can you change to non-empty sequences for all these variables, with unique values? And ensure that you get the correct comparison also for sequence_static_string.
PTAL nisse. https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... File webrtc/stats/rtcstats_unittest.cc (right): https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... webrtc/stats/rtcstats_unittest.cc:135: EXPECT_EQ(strcmp(*stats.m_static_string, "123"), 0); On 2016/09/14 07:53:07, nisse-webrtc wrote: > Makes me think: Do you really need stats using the type const char*? If all > strings can be std::string, that would make things a little simpler. But that's > perhaps best addressed in a different cl. I think you're right, having two different string types seems kind of pointless (the idea is const strings don't have to be copied into the std::string container but these should be few and short). I'll remove in a separate CL. https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... webrtc/stats/rtcstats_unittest.cc:142: EXPECT_EQ(*stats.m_sequence_static_string, std::vector<const char*>()); On 2016/09/14 07:53:07, nisse-webrtc wrote: > Can you change to non-empty sequences for all these variables, with unique > values? And ensure that you get the correct comparison also for > sequence_static_string. Done.
https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... File webrtc/stats/rtcstats_unittest.cc (right): https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... webrtc/stats/rtcstats_unittest.cc:142: EXPECT_EQ(*stats.m_sequence_static_string, std::vector<const char*>()); On 2016/09/14 08:21:15, hbos wrote: > On 2016/09/14 07:53:07, nisse-webrtc wrote: > > Can you change to non-empty sequences for all these variables, with unique > > values? And ensure that you get the correct comparison also for > > sequence_static_string. > > Done. Not all, could you add a unique value each also to the other m_sequence_* ?
Patchset #3 (id:60001) has been deleted
PTAL nisse https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... File webrtc/stats/rtcstats_unittest.cc (right): https://codereview.webrtc.org/2333343002/diff/20001/webrtc/stats/rtcstats_uni... webrtc/stats/rtcstats_unittest.cc:142: EXPECT_EQ(*stats.m_sequence_static_string, std::vector<const char*>()); On 2016/09/14 08:36:42, nisse-webrtc wrote: > On 2016/09/14 08:21:15, hbos wrote: > > On 2016/09/14 07:53:07, nisse-webrtc wrote: > > > Can you change to non-empty sequences for all these variables, with unique > > > values? And ensure that you get the correct comparison also for > > > sequence_static_string. > > > > Done. > > Not all, could you add a unique value each also to the other m_sequence_* ? Oh right, done.
lgtm
The CQ bit was checked by hbos@webrtc.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_arm64_rel on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL) android_dbg on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL)
Description was changed from ========== Fix issues with rtc_stats_unittests tests so that they can run on bots. This target is not run on bots so a couple of issues went under the radar. If we expose the tests and run them on the bots[1] two issues are surfaced which this CL fixes. After this CL lands we can enable this target on the bots without it going red. rtcstats_unittest.cc: Fix const char* string comparison issue by comparing with strcmp instead of equality check. rtcstatscollector_unittest.cc: Fix TSAN issue by constructing ScopedFakeClock before spawning Threads. [1] https://codereview.webrtc.org/2340443002/ BUG=chromium:627816 ========== to ========== Fix issues with rtc_stats_unittests tests so that they can run on bots. This target is not run on bots so a couple of issues went under the radar. If we expose the tests and run them on the bots[1] two issues are surfaced which this CL fixes. After this CL lands we can enable this target on the bots without it going red. rtcstats_unittest.cc: Fix const char* string comparison issue by comparing with strcmp instead of equality check. rtcstatscollector_unittest.cc: Fix TSAN issue by constructing ScopedFakeClock before spawning Threads. [1] https://codereview.webrtc.org/2340443002/ BUG=chromium:627816 NOTRY=True ==========
Offline bots, everything else green, also these test don't yet execute (just build) on bots, landing with NOTRY=True.
The CQ bit was checked by hbos@webrtc.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
Message was sent while issue was closed.
Description was changed from ========== Fix issues with rtc_stats_unittests tests so that they can run on bots. This target is not run on bots so a couple of issues went under the radar. If we expose the tests and run them on the bots[1] two issues are surfaced which this CL fixes. After this CL lands we can enable this target on the bots without it going red. rtcstats_unittest.cc: Fix const char* string comparison issue by comparing with strcmp instead of equality check. rtcstatscollector_unittest.cc: Fix TSAN issue by constructing ScopedFakeClock before spawning Threads. [1] https://codereview.webrtc.org/2340443002/ BUG=chromium:627816 NOTRY=True ========== to ========== Fix issues with rtc_stats_unittests tests so that they can run on bots. This target is not run on bots so a couple of issues went under the radar. If we expose the tests and run them on the bots[1] two issues are surfaced which this CL fixes. After this CL lands we can enable this target on the bots without it going red. rtcstats_unittest.cc: Fix const char* string comparison issue by comparing with strcmp instead of equality check. rtcstatscollector_unittest.cc: Fix TSAN issue by constructing ScopedFakeClock before spawning Threads. [1] https://codereview.webrtc.org/2340443002/ BUG=chromium:627816 NOTRY=True ==========
Message was sent while issue was closed.
Committed patchset #3 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== Fix issues with rtc_stats_unittests tests so that they can run on bots. This target is not run on bots so a couple of issues went under the radar. If we expose the tests and run them on the bots[1] two issues are surfaced which this CL fixes. After this CL lands we can enable this target on the bots without it going red. rtcstats_unittest.cc: Fix const char* string comparison issue by comparing with strcmp instead of equality check. rtcstatscollector_unittest.cc: Fix TSAN issue by constructing ScopedFakeClock before spawning Threads. [1] https://codereview.webrtc.org/2340443002/ BUG=chromium:627816 NOTRY=True ========== to ========== Fix issues with rtc_stats_unittests tests so that they can run on bots. This target is not run on bots so a couple of issues went under the radar. If we expose the tests and run them on the bots[1] two issues are surfaced which this CL fixes. After this CL lands we can enable this target on the bots without it going red. rtcstats_unittest.cc: Fix const char* string comparison issue by comparing with strcmp instead of equality check. rtcstatscollector_unittest.cc: Fix TSAN issue by constructing ScopedFakeClock before spawning Threads. [1] https://codereview.webrtc.org/2340443002/ BUG=chromium:627816 NOTRY=True Committed: https://crrev.com/fdafab84bc9db9eabdf54b1186c27abfe871801a Cr-Commit-Position: refs/heads/master@{#14215} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/fdafab84bc9db9eabdf54b1186c27abfe871801a Cr-Commit-Position: refs/heads/master@{#14215} |