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

Issue 2162053006: Move EXPECT_DCHECK_DEATH from base/task_scheduler and use it in relevant base/ tests (Closed)

Created:
4 years, 5 months ago by gab
Modified:
4 years, 4 months ago
CC:
chromium-reviews, sadrul, robliao+watch_chromium.org, gavinp+memory_chromium.org, fdoray+watch_chromium.org, asvitkine+watch_chromium.org, gab+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move EXPECT_DCHECK_DEATH from base/task_scheduler and use it in relevant base/ tests Extracted from https://codereview.chromium.org/2163023002/ This has the following advantages: - Reduces inconsistent usage of #if preprocessors macros for death tests. - Enables some tests when DCHECK_ALWAYS_ON in Release builds that were previously not (per aforementioned inconsistency) - Runs those tests anyways (modulo call expected to die) in non-DCHECK builds -- resulting in extra coverage (though sometimes mostly a no-op). TODO(gab): Try to enable death tests on OS_ANDROID in a follow-up CL and document what breaks. BUG=622400 (relation to that bug is the attempt to open as many tests as possible to Release+DCHECK_ALWAYS_ON started in https://codereview.chromium.org/2163023002/ as a safety measure for the impl for 622400) Committed: https://crrev.com/c964a852c558c9876e49b1bcea0d98c720b5b300 Cr-Commit-Position: refs/heads/master@{#408978}

Patch Set 1 #

Total comments: 10

Patch Set 2 : fix compile (refer to |statement| in non-dcheck builds) #

Total comments: 1

Patch Set 3 : review:danakj #

Patch Set 4 : Copy GTEST_UNSUPPORTED_DEATH_TEST from gtest internal while it's being exposed in upstream repo. #

Patch Set 5 : undef copied macro after use #

Total comments: 6

Patch Set 6 : rm undef -- needed because of nested macros... #

Patch Set 7 : merge up to r407479 #

Patch Set 8 : merge up to r408965 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -122 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M base/bind_unittest.cc View 2 chunks +2 lines, -6 lines 0 comments Download
M base/memory/weak_ptr_unittest.cc View 7 chunks +6 lines, -9 lines 0 comments Download
M base/message_loop/message_pump_io_ios_unittest.cc View 2 chunks +7 lines, -8 lines 0 comments Download
M base/message_loop/message_pump_libevent_unittest.cc View 3 chunks +8 lines, -8 lines 0 comments Download
M base/metrics/field_trial_unittest.cc View 2 chunks +7 lines, -6 lines 0 comments Download
M base/metrics/histogram_unittest.cc View 3 chunks +9 lines, -8 lines 0 comments Download
M base/metrics/persistent_sample_map_unittest.cc View 3 chunks +3 lines, -6 lines 0 comments Download
M base/metrics/sample_map_unittest.cc View 3 chunks +3 lines, -7 lines 0 comments Download
M base/metrics/sample_vector_unittest.cc View 3 chunks +3 lines, -7 lines 0 comments Download
M base/synchronization/atomic_flag_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -9 lines 0 comments Download
M base/task_scheduler/priority_queue_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/task_scheduler/scheduler_lock_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M base/task_scheduler/scheduler_worker_stack_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M base/task_scheduler/task_tracker_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
D base/task_scheduler/test_utils.h View 1 chunk +0 lines, -19 lines 0 comments Download
M base/test/gtest_util.h View 1 2 3 5 1 chunk +44 lines, -0 lines 0 comments Download
M base/threading/non_thread_safe_unittest.cc View 5 chunks +5 lines, -10 lines 0 comments Download
M base/threading/thread_checker_unittest.cc View 5 chunks +5 lines, -10 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 49 (34 generated)
gab
Dana PTAL, extracted from https://codereview.chromium.org/2163023002/ for the death tests cleanup part of it.
4 years, 5 months ago (2016-07-20 16:16:25 UTC) #10
danakj
https://codereview.chromium.org/2162053006/diff/40001/base/base.gyp File base/base.gyp (right): https://codereview.chromium.org/2162053006/diff/40001/base/base.gyp#newcode574 base/base.gyp:574: 'threading/sequenced_task_runner_handle_unittest.cc', Thanks for the sorting https://codereview.chromium.org/2162053006/diff/40001/base/numerics/safe_numerics_unittest.cc File base/numerics/safe_numerics_unittest.cc (right): ...
4 years, 5 months ago (2016-07-20 19:33:46 UTC) #15
gab
https://codereview.chromium.org/2162053006/diff/40001/base/base.gyp File base/base.gyp (right): https://codereview.chromium.org/2162053006/diff/40001/base/base.gyp#newcode574 base/base.gyp:574: 'threading/sequenced_task_runner_handle_unittest.cc', On 2016/07/20 19:33:45, danakj wrote: > Thanks for ...
4 years, 5 months ago (2016-07-20 21:21:08 UTC) #17
gab
+phajdan.jr@ to advise on base/test (see inline self-comment)
4 years, 5 months ago (2016-07-20 21:21:50 UTC) #19
gab
Copied required internal gtest macro for now (while I'm working on exposing it in the ...
4 years, 5 months ago (2016-07-22 14:19:29 UTC) #23
danakj
https://codereview.chromium.org/2162053006/diff/110001/base/test/gtest_util.h File base/test/gtest_util.h (right): https://codereview.chromium.org/2162053006/diff/110001/base/test/gtest_util.h#newcode38 base/test/gtest_util.h:38: GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ While I understand you copy/pasted this out ...
4 years, 5 months ago (2016-07-22 21:15:47 UTC) #27
gab
https://codereview.chromium.org/2162053006/diff/110001/base/test/gtest_util.h File base/test/gtest_util.h (right): https://codereview.chromium.org/2162053006/diff/110001/base/test/gtest_util.h#newcode38 base/test/gtest_util.h:38: GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ On 2016/07/22 21:15:46, danakj wrote: > While ...
4 years, 5 months ago (2016-07-25 15:46:21 UTC) #33
danakj
https://codereview.chromium.org/2162053006/diff/110001/base/test/gtest_util.h File base/test/gtest_util.h (right): https://codereview.chromium.org/2162053006/diff/110001/base/test/gtest_util.h#newcode38 base/test/gtest_util.h:38: GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ On 2016/07/25 15:46:21, gab wrote: > On ...
4 years, 5 months ago (2016-07-25 18:45:59 UTC) #36
gab
https://codereview.chromium.org/2162053006/diff/110001/base/test/gtest_util.h File base/test/gtest_util.h (right): https://codereview.chromium.org/2162053006/diff/110001/base/test/gtest_util.h#newcode38 base/test/gtest_util.h:38: GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ On 2016/07/25 18:45:59, danakj wrote: > On ...
4 years, 4 months ago (2016-07-27 17:00:50 UTC) #37
danakj
ok LGTM thanks!
4 years, 4 months ago (2016-07-27 21:39:36 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2162053006/170001
4 years, 4 months ago (2016-07-28 14:06:28 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/42905) ios-device-gn on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 4 months ago (2016-07-28 14:08:37 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2162053006/190001
4 years, 4 months ago (2016-08-01 15:42:17 UTC) #45
commit-bot: I haz the power
Committed patchset #8 (id:190001)
4 years, 4 months ago (2016-08-01 16:40:29 UTC) #47
commit-bot: I haz the power
4 years, 4 months ago (2016-08-01 16:42:17 UTC) #49
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/c964a852c558c9876e49b1bcea0d98c720b5b300
Cr-Commit-Position: refs/heads/master@{#408978}

Powered by Google App Engine
This is Rietveld 408576698