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

Issue 10582012: For unit tests, track additions to AtExitManager and warn. (Closed)

Created:
8 years, 6 months ago by Scott Byer
Modified:
8 years, 4 months ago
CC:
chromium-reviews, jochen+watch-content_chromium.org, erikwright (departed), jam, joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

For unit tests, track additions to AtExitManager and warn. While trying to bullet proof a unit test, I had trouble getting very far when running all tests in shuffle mode. Tracked that back to a few other tests doing stuff that accessed Singleton()s outside of a test-scoped ShadowingAtExitManager. Seemed to me that should be an invariant around any unit test, so created this towards that end, hopefully helping stabilize out unit_tests a bit more. BUG=133403 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=144488 Reverted in https://chromiumcodereview.appspot.com/10834010/ - it was just causing noise, and really isn't the right answer. The right answer is to debug and finish up http://codereview.chromium.org/10735063/

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use a TestEventListener instead. #

Patch Set 3 : Cause an error; for trybot run. Ignore. #

Total comments: 4

Patch Set 4 : Clean up, still an intermediate state to see what happens on the try bot. #

Patch Set 5 : Back off to a warning. #

Total comments: 10

Patch Set 6 : Clean up API, messaging, switches #

Patch Set 7 : Fix compile #

Total comments: 8

Patch Set 8 : Additional fixes. #

Total comments: 2

Patch Set 9 : Fix sort order #

Patch Set 10 : Fix presubmit warnings; #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -17 lines) Patch
M base/at_exit.h View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -1 line 0 comments Download
M base/at_exit.cc View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -1 line 0 comments Download
M base/test/test_suite.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M base/test/test_suite.cc View 1 2 3 4 5 6 7 4 chunks +56 lines, -0 lines 0 comments Download
M base/test/test_switches.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M base/test/test_switches.cc View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -4 lines 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M content/public/test/test_launcher.h View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -3 lines 0 comments Download
M content/test/test_launcher.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Scott Byer
Looking for some thoughts here before I pursue this any further. While I could clean ...
8 years, 6 months ago (2012-06-18 23:45:57 UTC) #1
brettw
I guess I don't get when I should derive from UnitTest and when I shouldn't. ...
8 years, 6 months ago (2012-06-19 04:06:13 UTC) #2
Paweł Hajdan Jr.
1. I've tried a very similar thing 1-2 years ago and hit problems with tests ...
8 years, 6 months ago (2012-06-19 18:42:09 UTC) #3
Scott Byer
On 2012/06/19 18:42:09, Paweł Hajdan Jr. wrote: > 1. I've tried a very similar thing ...
8 years, 6 months ago (2012-06-19 21:57:29 UTC) #4
Paweł Hajdan Jr.
Please don't use ShadowingAtExitManager, it's very likely to cause weirdness. I think it's fine to ...
8 years, 6 months ago (2012-06-20 07:47:13 UTC) #5
Scott Byer
Ok, modified AtExitManager, it is cleaner. http://codereview.chromium.org/10582012/diff/3005/base/test/test_suite.cc File base/test/test_suite.cc (right): http://codereview.chromium.org/10582012/diff/3005/base/test/test_suite.cc#newcode214 base/test/test_suite.cc:214: LOG(INFO) << "Adding ...
8 years, 6 months ago (2012-06-21 00:05:41 UTC) #6
Paweł Hajdan Jr.
Minor comments. http://codereview.chromium.org/10582012/diff/11006/base/at_exit.h File base/at_exit.h (right): http://codereview.chromium.org/10582012/diff/11006/base/at_exit.h#newcode65 base/at_exit.h:65: static void* CurrentAtExitManager(); nit: Let's not repeat ...
8 years, 6 months ago (2012-06-21 08:45:24 UTC) #7
Scott Byer
http://codereview.chromium.org/10582012/diff/11006/base/at_exit.h File base/at_exit.h (right): http://codereview.chromium.org/10582012/diff/11006/base/at_exit.h#newcode65 base/at_exit.h:65: static void* CurrentAtExitManager(); On 2012/06/21 08:45:24, Paweł Hajdan Jr. ...
8 years, 6 months ago (2012-06-21 21:35:01 UTC) #8
Paweł Hajdan Jr.
http://codereview.chromium.org/10582012/diff/26001/base/at_exit.cc File base/at_exit.cc (right): http://codereview.chromium.org/10582012/diff/26001/base/at_exit.cc#newcode90 base/at_exit.cc:90: nit: Remove redundant empty line. http://codereview.chromium.org/10582012/diff/26001/base/at_exit.h File base/at_exit.h (right): ...
8 years, 6 months ago (2012-06-22 07:52:42 UTC) #9
Scott Byer
http://codereview.chromium.org/10582012/diff/26001/base/at_exit.cc File base/at_exit.cc (right): http://codereview.chromium.org/10582012/diff/26001/base/at_exit.cc#newcode90 base/at_exit.cc:90: On 2012/06/22 07:52:42, Paweł Hajdan Jr. wrote: > nit: ...
8 years, 6 months ago (2012-06-22 22:02:55 UTC) #10
Paweł Hajdan Jr.
LGTM base/ owners, please take a look at base/at_exit changes http://codereview.chromium.org/10582012/diff/37001/base/test/test_switches.cc File base/test/test_switches.cc (right): http://codereview.chromium.org/10582012/diff/37001/base/test/test_switches.cc#newcode14 ...
8 years, 6 months ago (2012-06-23 07:17:30 UTC) #11
brettw
lgtm
8 years, 5 months ago (2012-06-27 16:23:13 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottbyer@chromium.org/10582012/43002
8 years, 5 months ago (2012-06-27 16:25:10 UTC) #13
commit-bot: I haz the power
8 years, 5 months ago (2012-06-27 17:55:00 UTC) #14
Change committed as 144488

Powered by Google App Engine
This is Rietveld 408576698