Add a .crash() method to the testplugin

RESOLVED FIXED

Status

()

RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: benjamin, Assigned: benjamin)

Tracking

Other Branch
x86
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [notacrash])

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

9 years ago
In order to test crash reporting for plugin processes, we should have a method on the testplugin that crashes.
(Assignee)

Comment 1

9 years ago
Created attachment 415651 [details] [diff] [review]
Add testplugin.crash(), rev. 0

This adds a .crash() method to the testplugin which kinda works when you run `make mochitest-ipcplugins`. Unfortunately, the parent process crashes in the next test, probably because the plugin module is invalid but the plugin host doesn't know that.... that might be fixed, or at least helped, by bug 529005

jgriffin, this test should only be run when IPC plugins are enabled. Could you figure out a way to make that happen?
(Assignee)

Comment 2

9 years ago
whoops, cc'ing jgriffin, please see comment 1
Created attachment 415720 [details] [diff] [review]
Add testplugin.crash(), rev. 1

Unfortunately there's no really slick way to exclude a mochitest based on a preference, so I've added an "ifdef MOZ_IPC" in the makefile, and a preference read in the test itself.  Once OOPP are on by default, we can remove the preference read.

Someday it would be nice to convert mochitest to a manifest-based framework, so that it can more intelligently select tests based on the characteristics of the software-under-test.  I think this would be especially useful for dealing with mochitest on embedded devices.  But not today...
Attachment #415651 - Attachment is obsolete: true
(Assignee)

Comment 4

9 years ago
Created attachment 415953 [details] [diff] [review]
Add testplugin.crash(), rev. 2

Added a test for reloading, which should cause the plugin to be started over after a crash. I'll land this with bug 532751.
Attachment #415720 - Attachment is obsolete: true

Updated

9 years ago
Whiteboard: [notacrash]
(Assignee)

Updated

9 years ago
Depends on: 533482
(Assignee)

Comment 5

9 years ago
http://hg.mozilla.org/mozilla-central/rev/c228f7ad2a50
followup for build bustage: http://hg.mozilla.org/mozilla-central/rev/c15b2b4cfbf2

See also bug 533482. The test is currently disabled waiting on pluginhost changes, but I'm re-enabling it in that bug 532751
Depends on: 532751
(Assignee)

Updated

9 years ago
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Updated

9 years ago
Depends on: 535802
(Assignee)

Comment 6

9 years ago
Re-enabled on mozilla-central at http://hg.mozilla.org/mozilla-central/rev/1cb8d8078bc5
You need to log in before you can comment on or make changes to this bug.