Closed
Bug 803254
Opened 11 years ago
Closed 11 years ago
Marionette should detect when a gecko/emulator instance it has launched has crashed
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox18 fixed, firefox19 fixed)
RESOLVED
FIXED
mozilla19
People
(Reporter: jgriffin, Assigned: jgriffin)
References
Details
Attachments
(2 files, 2 obsolete files)
6.80 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
5.73 KB,
patch
|
Details | Diff | Splinter Review |
Currently, the emulator is subject to a crash while running telephony tests. When this occurs, it is hard to tell from Marionette's log that this is what happened. If Marionette has launched a gecko or emulator instance, it should check if this instance is alive after running each test. If it isn't, it should output an appropriate failure and skip the rest of the tests, rather than emitting an error for each of them like "Connection refused".
Assignee | ||
Comment 1•11 years ago
|
||
This detects when an emulator has crashed. It doesn't detect when a Firefox instance has crashed - that will be more work to get right across OS's, and we may have to tweak mozprocess to get it to work. So even though we want to do that eventually, I'd like to punt on that for now, and just fix the emulator case that we need for TBPL work.
Attachment #673009 -
Flags: review?(ahalberstadt)
Comment 2•11 years ago
|
||
Comment on attachment 673009 [details] [diff] [review] Detect emulator crashes, Review of attachment 673009 [details] [diff] [review]: ----------------------------------------------------------------- I guess this ok, but shouldn't this logic live in emulator.py? Seems like anything that uses emulators might want to know if it crashed. r+ anyway because the check_for_process method doesn't really do anything groundbreaking. Please address the nit though. ::: testing/marionette/client/marionette/runtests.py @@ +331,5 @@ > testgroup.submit() > > + def check_for_process(self): > + if (self.marionette.emulator and self.marionette.emulator.proc and > + not self.marionette.emulator.is_running): nit: This is confusing, since if the emulator or proc objects are None, check_for_process returns True, which would make the user think that the process does exist. Changing the name of the function is probably good enough.
Attachment #673009 -
Flags: review?(ahalberstadt) → review+
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #2) > Comment on attachment 673009 [details] [diff] [review] > Detect emulator crashes, > > Review of attachment 673009 [details] [diff] [review]: > ----------------------------------------------------------------- > > I guess this ok, but shouldn't this logic live in emulator.py? Seems like > anything that uses emulators might want to know if it crashed. > > r+ anyway because the check_for_process method doesn't really do anything > groundbreaking. Please address the nit though. > > ::: testing/marionette/client/marionette/runtests.py > @@ +331,5 @@ > > testgroup.submit() > > > > + def check_for_process(self): > > + if (self.marionette.emulator and self.marionette.emulator.proc and > > + not self.marionette.emulator.is_running): > > nit: This is confusing, since if the emulator or proc objects are None, > check_for_process returns True, which would make the user think that the > process does exist. Changing the name of the function is probably good > enough. What would you suggest instead? The tricky part is that you can run tests on an emulator you've launched yourself, in which case Marionette cannot determine if the emulator is alive or not (since it doesn't know its pid). In that case, emulator.proc is None. I guess we could reverse things to do something like: def check_if_crashed(self): # logic which would always return False in the case of a manually-launched emulator, i.e., when emulator.proc is None. Does that make more sense?
Assignee | ||
Comment 4•11 years ago
|
||
Ok, I think this is a cleaner solution
Attachment #674027 -
Flags: review?(ahalberstadt)
Assignee | ||
Updated•11 years ago
|
Attachment #673009 -
Attachment is obsolete: true
Comment 5•11 years ago
|
||
Comment on attachment 674027 [details] [diff] [review] Detect emulator crashes, Review of attachment 674027 [details] [diff] [review]: ----------------------------------------------------------------- r+ on the condition that this gets added to the emulator.py in mozdevice as well since marionette is supposed to be using that in the near future.
Attachment #674027 -
Flags: review?(ahalberstadt) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Updated with review comments, pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=2efc963747d6&noignore=1
Assignee | ||
Updated•11 years ago
|
Attachment #674027 -
Attachment is obsolete: true
Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 674430 [details] [diff] [review] Detect emulator crashes, Carrying r+ forward
Attachment #674430 -
Flags: review+
Assignee | ||
Comment 8•11 years ago
|
||
Try run was green, landed as https://hg.mozilla.org/mozilla-central/rev/b1e54bf5bd6f
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Assignee | ||
Comment 9•11 years ago
|
||
Landed on ash as aurora-try: https://tbpl.mozilla.org/?tree=Ash&rev=0f8d21413c86
Whiteboard: [automation-needed-in-aurora]
Assignee | ||
Comment 10•11 years ago
|
||
A modified patch that I'm landing on ash, since the original didn't apply cleanly: https://hg.mozilla.org/projects/ash/rev/6d4dff1f9b3e
Assignee | ||
Comment 11•11 years ago
|
||
http://hg.mozilla.org/releases/mozilla-aurora/rev/d45c28a32e26
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
Whiteboard: [automation-needed-in-aurora]
Comment 12•11 years ago
|
||
Retroactively pushed the mozdevice portion of this patch to mozbase: https://github.com/mozilla/mozbase/commit/b9ccccacd903b7fbc1a52a3d3d49d20bc6b61a3a
Updated•1 month ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•