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

Issue 42266: Break up unit test to avoid internal timing interactions between parts.... (Closed)

Created:
11 years, 9 months ago by jar (doing other things)
Modified:
9 years, 7 months ago
Reviewers:
wtc
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Break up unit test to avoid internal timing interactions between parts. Hopefully this will cure teh flaky problem under Valgrind. I also had to re-read my own code, and so I put in to minor changes to hopefully make it incrementally easier ot read. There should be no semantic changes caused by my coding changes, but the level of nested braces is reduced, which makes it easier ot see what is (supposed to be) going on. r=dank,phajdan Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=17698

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -29 lines) Patch
M base/watchdog.cc View 1 chunk +25 lines, -25 lines 0 comments Download
M base/watchdog_unittest.cc View 1 2 chunks +8 lines, -4 lines 2 comments Download

Messages

Total messages: 10 (0 generated)
jar (doing other things)
11 years, 9 months ago (2009-03-17 02:44:57 UTC) #1
Evan Martin
Ping on this. Is it still valid? You can mention this bug in the description ...
11 years, 8 months ago (2009-04-07 01:24:31 UTC) #2
Evan Martin
Ping again for great justice!!!
11 years, 7 months ago (2009-05-13 18:38:48 UTC) #3
dank
I don't think this change helped. http://codereview.chromium.org/42147 did, but I stopped pursuing it after jar ...
11 years, 7 months ago (2009-05-13 18:43:20 UTC) #4
jar (doing other things)
LGTM I think I see the fundamental problem with the unit test is that I ...
11 years, 7 months ago (2009-05-13 19:45:51 UTC) #5
Evan Martin
On 2009/05/13 19:45:51, jar wrote: > LGTM Wait, you're the one who wrote this -- ...
11 years, 7 months ago (2009-05-13 20:05:44 UTC) #6
jar (doing other things)
<doh>... now I know why it looked so familiar. Note that I created this patch ...
11 years, 7 months ago (2009-05-13 23:24:32 UTC) #7
dank
It didn't help when I tried it. Can you test with valgrind yourself to see ...
11 years, 7 months ago (2009-05-26 20:39:29 UTC) #8
jar (doing other things)
Wan Teh, Can you take a look at this? The race condition I noted is ...
11 years, 6 months ago (2009-06-04 22:48:06 UTC) #9
wtc
11 years, 6 months ago (2009-06-04 23:14:24 UTC) #10
LGTM.

http://codereview.chromium.org/42266/diff/4/1003
File base/watchdog_unittest.cc (right):

http://codereview.chromium.org/42266/diff/4/1003#newcode80
Line 80: // Make sure a basic alarm fires when the time has expired.
This comment should show how AlarmPriorTimeTest differs from
AlarmTest.  This comment is exactly the same as the comment on
line 71!

http://codereview.chromium.org/42266/diff/4/1003#newcode82
Line 82: WatchdogCounter watchdog(TimeDelta::TimeDelta(), "Enabled2", true);
Why is the first argument TimeDelta::TimeDelta() instead
of TimeDelta::FromMilliseconds(10) or something like that?

Why can't this watchdog be named "Enabled"?  You didn't
changed the "Enabled" names in StartupShutdownTest and
ArmDisarmTest.

Powered by Google App Engine
This is Rietveld 408576698