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

Issue 6614014: autotest/factory: Interrupt tests by factory UI. (Closed)

Created:
9 years, 9 months ago by Hung-Te
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, truty+cc_chromium.org, sosa+cc_chromium.org, seano+cc_chromium.org, ericli, Tammo Spalink
Visibility:
Public.

Description

autotest/factory: Interrupt tests by factory UI. The original approach - sending USR1 to control and letting contol to nuke the active test, may raise EINTR to any system I/O in main control, which crashed the main control then the UI. In the future we may change the communication channel to a file descriptor. To minimize the impact to currect autotest framework, this CL let factory UI to kill active tests directly. NOTE: by that change, fork_wait_for won't raise OSError anymore so we have to override entire function. BUG=chrome-os-partner:2514 TEST=Verified on Alex that rapidly hitting hotkeys won't crash the UI (tested for about 30 seconds -- without this CL, UI usually crashed within 10 seconds) Change-Id: I6cba16907e85d81cf8975c3fe6e6d684f0221848 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=5d49ebf

Patch Set 1 #

Patch Set 2 : fixing comments #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -7 lines) Patch
M client/bin/factory_ui View 1 3 chunks +17 lines, -1 line 4 comments Download
M client/site_tests/suite_Factory/control View 3 chunks +17 lines, -6 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Hung-Te
9 years, 9 months ago (2011-03-03 10:42:51 UTC) #1
Hung-Te
Adding josephsih as reviewer because he also had experience in the killing active test stuff.
9 years, 9 months ago (2011-03-04 01:17:46 UTC) #2
Nick Sanders
lgtm
9 years, 9 months ago (2011-03-04 02:11:34 UTC) #3
josephsih1
LGTM with some minor nits. Two comments inside factory_ui. In factory,py, it registers a signal ...
9 years, 9 months ago (2011-03-04 02:12:29 UTC) #4
josephsih1
http://codereview.chromium.org/6614014/diff/3001/client/bin/factory_ui File client/bin/factory_ui (right): http://codereview.chromium.org/6614014/diff/3001/client/bin/factory_ui#newcode268 client/bin/factory_ui:268: if active_test_data is None: As in kill_current_test_callback() in factory.py, ...
9 years, 9 months ago (2011-03-04 02:13:11 UTC) #5
Hung-Te
On 2011/03/04 02:12:29, josephsih1 wrote: > In factory,py, it registers a signal handler kill_current_test_callback() to ...
9 years, 9 months ago (2011-03-04 02:15:16 UTC) #6
Hung-Te
9 years, 9 months ago (2011-03-04 02:21:28 UTC) #7
http://codereview.chromium.org/6614014/diff/3001/client/bin/factory_ui
File client/bin/factory_ui (right):

http://codereview.chromium.org/6614014/diff/3001/client/bin/factory_ui#newcod...
client/bin/factory_ui:268: if active_test_data is None:
Actually we should (almost) never see this, because it's only possible in the
very very early (before any tests startup, or if the main is broken so no one is
running) of main.

Anyway I can put it back next time, thanks for the suggestion!

http://codereview.chromium.org/6614014/diff/3001/client/bin/factory_ui#newcod...
client/bin/factory_ui:272: utils.nuke_pid(active_test_data[1])
These are in different processes, so it would not do what we want - that will
raise exception in UI and leave nothing in main control :)

Powered by Google App Engine
This is Rietveld 408576698