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

Issue 6689014: GTTF: Detect browser crashes on shutdown in UI tests. (Closed)

Created:
9 years, 8 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
Reviewers:
hnguyen, Jay Civelli, agl, sky, Huyen
CC:
chromium-reviews, kkania, amit, Paweł Hajdan Jr., pam+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

GTTF: Detect browser crashes on shutdown in UI tests. Previously the automation framework could miss a browser crash during shutdown on POSIX (on Windows there is crash_service.exe that should catch all crashes). This change makes the automation framework avoid losing information about the browser process' exit status (CrashAwareSleep), and fixes a bug in base::WaitForExitCodeWithTimeout (which on POSIX never reported the process has been signaled). Finally, it makes the automation framework use WaitForExitCodeWithTimeout instead of WaitForSingleProcess. This way we can get the exit status information in an accurate and cross-platform way. To avoid trying to close the same process handle twice (it's only an issue on Windows) I've changed WaitForExitCodeWithTimeout not to close the passed handle. It's only used in few places and I think this CL fixes all of them. I've tested this change locally on Mac with a UI test that SIGKILLs the browser. Before this change the test passed (it shouldn't), and after this change the test failed with an information that the browser has not exited cleanly. BUG=56644 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80608

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -148 lines) Patch
M base/process_util.h View 1 2 chunks +2 lines, -5 lines 0 comments Download
M base/process_util_posix.cc View 1 2 chunks +5 lines, -17 lines 0 comments Download
M base/process_util_win.cc View 1 3 chunks +1 line, -11 lines 0 comments Download
M chrome/browser/process_singleton_linux_uitest.cc View 1 3 chunks +12 lines, -3 lines 0 comments Download
M chrome/browser/unload_uitest.cc View 1 4 chunks +18 lines, -17 lines 0 comments Download
M chrome/common/service_process_util_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/automation/proxy_launcher.h View 1 2 3 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/test/automation/proxy_launcher.cc View 1 2 3 4 5 chunks +39 lines, -27 lines 0 comments Download
M chrome/test/interactive_ui/fast_shutdown_interactive_uitest.cc View 1 1 chunk +5 lines, -2 lines 2 comments Download
M chrome/test/out_of_proc_test_runner.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/ui/ui_test.h View 1 2 chunks +0 lines, -8 lines 0 comments Download
M chrome/test/ui/ui_test.cc View 1 11 chunks +13 lines, -50 lines 0 comments Download
M chrome_frame/test/perf/chrome_frame_perftest.cc View 1 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Paweł Hajdan Jr.
Please review: agl: process_util jcivelli: everything else
9 years, 8 months ago (2011-04-01 16:01:07 UTC) #1
agl
LGTM
9 years, 8 months ago (2011-04-01 16:58:55 UTC) #2
Paweł Hajdan Jr.
+sky, could you take a look?
9 years, 8 months ago (2011-04-05 07:02:51 UTC) #3
sky
LGTM
9 years, 8 months ago (2011-04-05 16:17:58 UTC) #4
Paweł Hajdan Jr.
Could you take another look? There was an issue with deleted AutomationProxy, see http://codereview.chromium.org/6794056/ .
9 years, 8 months ago (2011-04-05 19:45:29 UTC) #5
sky
SLGTM
9 years, 8 months ago (2011-04-05 20:08:49 UTC) #6
Huyen
I know this has already been submitted but I'm noticing a compilation error when making ...
9 years, 8 months ago (2011-04-07 00:07:44 UTC) #7
Paweł Hajdan Jr.
http://codereview.chromium.org/6689014/diff/15001/chrome/test/interactive_ui/fast_shutdown_interactive_uitest.cc File chrome/test/interactive_ui/fast_shutdown_interactive_uitest.cc (right): http://codereview.chromium.org/6689014/diff/15001/chrome/test/interactive_ui/fast_shutdown_interactive_uitest.cc#newcode60 chrome/test/interactive_ui/fast_shutdown_interactive_uitest.cc:60: TestTimeouts::wait_for_terminate_timeout_ms(), &exit_code)); On 2011/04/07 00:07:45, Huyen wrote: > Pawel, ...
9 years, 8 months ago (2011-04-07 06:25:19 UTC) #8
hnguyen
9 years, 8 months ago (2011-04-07 22:35:07 UTC) #9
On Wed, Apr 6, 2011 at 11:25 PM, <phajdan.jr@chromium.org> wrote:

>
>
>
http://codereview.chromium.org/6689014/diff/15001/chrome/test/interactive_ui/...
> File chrome/test/interactive_ui/fast_shutdown_interactive_uitest.cc
> (right):
>
>
>
http://codereview.chromium.org/6689014/diff/15001/chrome/test/interactive_ui/...
> chrome/test/interactive_ui/fast_shutdown_interactive_uitest.cc:60:
> TestTimeouts::wait_for_terminate_timeout_ms(), &exit_code));
> On 2011/04/07 00:07:45, Huyen wrote:
>
>> Pawel, I think you forgot to include test_timeouts.h. I tried to build
>>
> all
>
>> target and I'm getting an error:
>>
>
>  chrome/test/interactive_ui/fast_shutdown_interactive_uitest.cc: In
>>
> member
>
>> function ‘virtual void FastShutdown_SlowTermination_Test::TestBody()’:
>> chrome/test/interactive_ui/fast_shutdown_interactive_uitest.cc:59:
>>
> error:
>
>> ‘TestTimeouts’ was not declared in this scope
>>
>
> Thank you for commenting here. I took a look at the side-by-side diff,
> and TestTimeouts was used here before. Also, the change landed
> successfully on the waterfall, which suggests it didn't introduce a
> compile failure.
>
> Do you have any local changes that could make this fail to compile? I
> agree though that test_timeouts.h should be explicitly #included here.
> Feel free to TBR such a change to me.


This is breaking on the try server and locally for me on patch
http://codereview.chromium.org/6685099/.
I've added fast_shutdown_interactive_uitest.cc to the above patch.


>
> http://codereview.chromium.org/6689014/
>

Powered by Google App Engine
This is Rietveld 408576698