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

Issue 9584017: New test infrastructure for producing verbose logs in failing tests. (Closed)

Created:
8 years, 9 months ago by grt (UTC plus 2)
Modified:
8 years, 9 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, erikwright (departed)
Visibility:
Public.

Description

New test infrastructure for producing verbose logs in failing tests. This infrastructure allows Google Test-based tests to opt-in to some magic that results in extremely verbose logs appearing in test output for only those tests that fail. This includes all LOG() messages generated by chrome.exe, npchrome_frame.exe, and the test executable itself, as well as all TRACE_EVENT_*_ETW events. The interesting entrypoints are in test_log_collector_win.h, file_logger_win.h, and log_file_printer_win.h. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=126240

Patch Set 1 #

Total comments: 33

Patch Set 2 : comment updates #

Total comments: 8

Patch Set 3 : dear robert #

Patch Set 4 : dear erik #

Patch Set 5 : capture trace events as well #

Total comments: 18

Patch Set 6 : dear robert #

Patch Set 7 : decoupled parsing and printing, extracted mof parser, simplified all around #

Total comments: 1

Patch Set 8 : now with a unit test on the parser #

Patch Set 9 : tweaked comments #

Total comments: 8

Patch Set 10 : oops, forgot to add test #

Total comments: 16

Patch Set 11 : addressed robert's comments #

Total comments: 4

Patch Set 12 : comments addressed #

Patch Set 13 : moved logging_win to logging/win so regular filename_rules work #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1643 lines, -9 lines) Patch
M base/logging_win.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M base/win/event_trace_provider.cc View 1 2 3 4 5 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/test/base/test_switches.h View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/test/base/test_switches.cc View 1 chunk +4 lines, -1 line 0 comments Download
A chrome/test/logging/win/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/logging/win/file_logger.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +113 lines, -0 lines 0 comments Download
A chrome/test/logging/win/file_logger.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +258 lines, -0 lines 0 comments Download
A chrome/test/logging/win/log_file_printer.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +26 lines, -0 lines 0 comments Download
A chrome/test/logging/win/log_file_printer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +248 lines, -0 lines 0 comments Download
A chrome/test/logging/win/log_file_reader.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +77 lines, -0 lines 0 comments Download
A chrome/test/logging/win/log_file_reader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +261 lines, -0 lines 0 comments Download
A chrome/test/logging/win/mof_data_parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +91 lines, -0 lines 0 comments Download
A chrome/test/logging/win/mof_data_parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/test/logging/win/mof_data_parser_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +191 lines, -0 lines 0 comments Download
A chrome/test/logging/win/test_log_collector.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/test/logging/win/test_log_collector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +290 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
grt (UTC plus 2)
Hi guys, Would you two take a look at this CL, which contains the general-purpose ...
8 years, 9 months ago (2012-03-02 18:30:54 UTC) #1
erikwright (departed)
https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc#newcode26 chrome/test/base/file_logger_win.cc:26: // From chrome_tab.cc: {0562BFC3-2550-45b4-BD8E-A310583D3A6F} I would argue against declaring ...
8 years, 9 months ago (2012-03-02 20:47:59 UTC) #2
grt (UTC plus 2)
Thanks for the comments. Responses below. https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc#newcode26 chrome/test/base/file_logger_win.cc:26: // From chrome_tab.cc: ...
8 years, 9 months ago (2012-03-02 21:22:43 UTC) #3
robertshield
https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc#newcode94 chrome/test/base/file_logger_win.cc:94: *out_ << reinterpret_cast<const char*>(event->MofData); Is MofData guaranteed to be ...
8 years, 9 months ago (2012-03-02 22:37:41 UTC) #4
erikwright (departed)
http://codereview.chromium.org/9584017/diff/1/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): http://codereview.chromium.org/9584017/diff/1/chrome/test/base/file_logger_win.cc#newcode26 chrome/test/base/file_logger_win.cc:26: // From chrome_tab.cc: {0562BFC3-2550-45b4-BD8E-A310583D3A6F} On 2012/03/02 21:22:43, grt wrote: ...
8 years, 9 months ago (2012-03-03 02:04:56 UTC) #5
grt (UTC plus 2)
Thanks, Robert. PTAL. https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc#newcode94 chrome/test/base/file_logger_win.cc:94: *out_ << reinterpret_cast<const char*>(event->MofData); On 2012/03/02 ...
8 years, 9 months ago (2012-03-03 02:12:43 UTC) #6
grt (UTC plus 2)
Thanks for the great comments, Erik. PTAL. http://codereview.chromium.org/9584017/diff/1/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): http://codereview.chromium.org/9584017/diff/1/chrome/test/base/file_logger_win.cc#newcode26 chrome/test/base/file_logger_win.cc:26: // From ...
8 years, 9 months ago (2012-03-03 02:31:58 UTC) #7
grt (UTC plus 2)
Gents, This update includes support for capturing/dumping trace events (previously only log messages). PTAL.
8 years, 9 months ago (2012-03-05 18:25:41 UTC) #8
robertshield
https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): https://chromiumcodereview.appspot.com/9584017/diff/1/chrome/test/base/file_logger_win.cc#newcode144 chrome/test/base/file_logger_win.cc:144: SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, On 2012/03/03 02:12:43, grt wrote: > ...
8 years, 9 months ago (2012-03-05 19:20:53 UTC) #9
erikwright (departed)
My main comment is that file_logger_win.cc has a whole lot of utility code in it ...
8 years, 9 months ago (2012-03-05 19:55:30 UTC) #10
robertshield
http://codereview.chromium.org/9584017/diff/8001/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): http://codereview.chromium.org/9584017/diff/8001/chrome/test/base/file_logger_win.cc#newcode160 chrome/test/base/file_logger_win.cc:160: : public base::win::EtwTraceConsumerBase<TraceConsumer<ProcessEventFn> > { On 2012/03/05 19:20:54, robertshield ...
8 years, 9 months ago (2012-03-05 19:57:07 UTC) #11
grt (UTC plus 2)
Thanks, Robert. I've responded to your comments here. Erik: yours are more far-reaching (and appreciated), ...
8 years, 9 months ago (2012-03-06 03:24:56 UTC) #12
grt (UTC plus 2)
Hi guys, I pulled the parsing and printing stuff out of the logging parts, and ...
8 years, 9 months ago (2012-03-08 21:37:06 UTC) #13
grt (UTC plus 2)
Hi gang, This CL is ready for review. I'd like to land it soonish so ...
8 years, 9 months ago (2012-03-09 15:43:26 UTC) #14
grt (UTC plus 2)
I just added the missing test file in patch set 10. It's otherwise identical to ...
8 years, 9 months ago (2012-03-09 16:37:27 UTC) #15
robertshield
https://chromiumcodereview.appspot.com/9584017/diff/26016/base/win/event_trace_provider.cc File base/win/event_trace_provider.cc (right): https://chromiumcodereview.appspot.com/9584017/diff/26016/base/win/event_trace_provider.cc#newcode89 base/win/event_trace_provider.cc:89: DisableEvents(); if session_handle_ is null, the level and flags ...
8 years, 9 months ago (2012-03-09 16:58:04 UTC) #16
sky
Pawel, will you have time to review this? -Scott
8 years, 9 months ago (2012-03-09 17:17:45 UTC) #17
grt (UTC plus 2)
Thanks for the comments. PTAL. Pawel et al.: For an idea of what this brings ...
8 years, 9 months ago (2012-03-09 17:55:25 UTC) #18
Paweł Hajdan Jr.
Please put this nice new thing in chrome/test/logging (feel free to add yourself or anyone ...
8 years, 9 months ago (2012-03-09 18:12:11 UTC) #19
erikwright (departed)
https://chromiumcodereview.appspot.com/9584017/diff/26019/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): https://chromiumcodereview.appspot.com/9584017/diff/26019/chrome/test/base/file_logger_win.cc#newcode88 chrome/test/base/file_logger_win.cc:88: // Set the value for the whole system and ...
8 years, 9 months ago (2012-03-09 18:25:50 UTC) #20
willchan no longer on Chromium
base/ LGTM, although I don't fully understand the ETW fix. Please make sure another one ...
8 years, 9 months ago (2012-03-09 18:37:51 UTC) #21
erikwright (departed)
https://chromiumcodereview.appspot.com/9584017/diff/26019/chrome/test/base/log_file_reader_win.cc File chrome/test/base/log_file_reader_win.cc (right): https://chromiumcodereview.appspot.com/9584017/diff/26019/chrome/test/base/log_file_reader_win.cc#newcode154 chrome/test/base/log_file_reader_win.cc:154: if (parser.ReadDWORD(&stack_depth) && Presumably this maps to some writing ...
8 years, 9 months ago (2012-03-09 18:50:33 UTC) #22
grt (UTC plus 2)
PTAL y'all. https://chromiumcodereview.appspot.com/9584017/diff/26019/chrome/test/base/file_logger_win.cc File chrome/test/base/file_logger_win.cc (right): https://chromiumcodereview.appspot.com/9584017/diff/26019/chrome/test/base/file_logger_win.cc#newcode88 chrome/test/base/file_logger_win.cc:88: // Set the value for the whole ...
8 years, 9 months ago (2012-03-09 20:38:57 UTC) #23
robertshield
lgtm
8 years, 9 months ago (2012-03-11 05:06:43 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/grt@chromium.org/9584017/31004
8 years, 9 months ago (2012-03-12 15:50:00 UTC) #25
commit-bot: I haz the power
Try job failure for 9584017-31004 (retry) on linux_rel for step "compile" (clobber build). It's a ...
8 years, 9 months ago (2012-03-12 16:14:55 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/grt@chromium.org/9584017/34002
8 years, 9 months ago (2012-03-12 17:40:18 UTC) #27
commit-bot: I haz the power
8 years, 9 months ago (2012-03-12 21:42:13 UTC) #28
Change committed as 126240

Powered by Google App Engine
This is Rietveld 408576698