Closed
Bug 1040742
Opened 10 years ago
Closed 9 years ago
MarionetteTestCase should not try to delete_session/call the server if a crash has occurred
Categories
(Testing :: Marionette Client and Harness, defect)
Tracking
(firefox44 fixed)
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: zcampbell, Assigned: impossibus)
References
Details
(Keywords: pi-marionette-client, pi-marionette-runner, Whiteboard: [affects=gaia][affects=b2g])
Attachments
(2 files)
If a crash has occurred in b2g and tearDown has been called then the tearDown will fail because the marionette server is not up.
Seeing as MarionetteTestCase can/will detect when a crash has occurred, we can use this to conditionally execute the remainder of MarionetteTestCase.tearDown.
Put simply, if a crash has occurred we should not make any more calls to the marionette server and cleanup, but still do cleanup inside MarionetteTestCase where required.
Reporter | ||
Updated•10 years ago
|
Summary: MarionetteTestCase should not try to delete/tearDown if a crash has occurred. → MarionetteTestCase should not try to delete_session/call the server if a crash has occurred
Updated•10 years ago
|
Keywords: ateam-marionette-client
Whiteboard: [affects=webqa]
Comment 2•10 years ago
|
||
What is the error that you get? Looking at the code it should handle there being no marionette server to speak to.
Do you know if there is a way to guarantee a crash?
Flags: needinfo?(zcampbell)
Reporter | ||
Comment 3•10 years ago
|
||
Just running this again, I think some recent changes to mozrunner and so forth have changed the way test failures are reported so I don't see tearDown failures reported any more. However the code does still exist, here:
http://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/marionette_test.py#548
you can loosely replicate a crash by doing `adb shell stop b2g` while a test is running.
Running with a known crasher I can see it may affect logging too as TEST-END is not executed when the crash occurs.
Some logging depends on this so it may be two bugs here; one to remove marionette calls from tearDown and another to log correctly even after a crash.
Flags: needinfo?(zcampbell)
Whiteboard: [affects=webqa] → [affects=gaia][affects=b2g]
Reporter | ||
Comment 4•10 years ago
|
||
Attachment #8500964 -
Flags: review?(dave.hunt)
Reporter | ||
Comment 5•10 years ago
|
||
NB - this won't do anything because check_for_crashes doesn't execute when testing against device.
Depends on: 1038868
Comment 6•10 years ago
|
||
Comment on attachment 8500964 [details] [diff] [review]
bug_1040742.diff
Review of attachment 8500964 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/marionette/client/marionette/marionette_test.py
@@ +542,5 @@
> self.marionette.execute_script("log('TEST-START: %s:%s')" %
> (self.filepath.replace('\\', '\\\\'), self.methodName))
>
> def tearDown(self):
> + if not self.marionette.check_for_crash():
This will only return true if it detects a crash in this call. If a crash has previously been detected then this may return false. We now keep track of crashes in mozrunner (see bug 1075647) but we'll need a mozrunner release and bug 1038868 fixed before we can revisit this patch.
Attachment #8500964 -
Flags: review?(dave.hunt) → review-
Reporter | ||
Comment 7•10 years ago
|
||
OK, makes sense.
If we keep track of crashes in mozrunner does it make the check_for_crashes method redundant?
Comment 8•10 years ago
|
||
(In reply to Zac C (:zac) from comment #7)
> If we keep track of crashes in mozrunner does it make the check_for_crashes
> method redundant?
No, we still need to check for crashes. The change in mozrunner just keeps track of crashes detected when calling check_for_crashes.
Updated•10 years ago
|
Keywords: ateam-marionette-runner
Assignee | ||
Comment 9•9 years ago
|
||
It looks like this got fixed in Bug 1141519, but we might want to catch a specific exception when logging test-end fails.
Assignee | ||
Comment 10•9 years ago
|
||
Bug 1040742: Only ignore expected exceptions; r?automatedtester
Attachment #8669995 -
Flags: review?(dburns)
Comment 11•9 years ago
|
||
Comment on attachment 8669995 [details]
MozReview Request: Bug 1040742: Only ignore expected exceptions; r?automatedtester
https://reviewboard.mozilla.org/r/21313/#review19221
Attachment #8669995 -
Flags: review?(dburns) → review+
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → mjzffr
Assignee | ||
Comment 12•9 years ago
|
||
Keywords: checkin-needed
Comment 13•9 years ago
|
||
Keywords: checkin-needed
Comment 14•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Updated•2 years ago
|
Product: Testing → Remote Protocol
Comment 15•2 years ago
|
||
Moving bugs for Marionette client due to component changes.
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in
before you can comment on or make changes to this bug.
Description
•