Closed Bug 889076 Opened 11 years ago Closed 11 years ago

use the profile dir to store minidumps in the crashreporter xpcshell tests

Categories

(Toolkit :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25
Tracking Status
firefox25 --- fixed

People

(Reporter: mihneadb, Assigned: mihneadb)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 5 obsolete files)

No description provided.
Attached patch use the profile dir (obsolete) — Splinter Review
still need to figure out the test in unit_ipc. The others work fine.
Assignee: nobody → mihneadb
Blocks: 887064
:jdm, maybe you know how to fix this?
Flags: needinfo?(josh)
Could you clarify what's not working and what you're trying to achieve?
Flags: needinfo?(josh)
I want to run all xpcshell tests concurrently. For the crashreporter tests, this meant changing the path where the minidump is stored to the profile dir, since every test has its own profile dir, while cwd is the same for all of them. This change works for all the tests except for the one in unit_ipc,
And how does the failure manifest for the tests in unit_ipc?
Attached file log of the failure in unit_ipc (obsolete) —
:jdm, I attached the log.
Ok, so the symptom is that no minidump is found in the profile directory (the log helpfully obscures this due to bug 890677).
Right, and it has something to do with the fact that this is run in a new process, I guess. It is the only difference, the others work. You can just apply the patch from bug 887054 and try it yourself.
Interestingly enough, when I pasted the "get the profile dir" snippet into a random xpcshell test that runs in a content process, it threw an error because profd is redeclared. Try renaming it and see if anything changes?
Attached patch use the profile dir (obsolete) — Splinter Review
Attachment #769830 - Attachment is obsolete: true
Attachment #771805 - Attachment is obsolete: true
Attachment #772367 - Flags: review?(ted)
Comment on attachment 772367 [details] [diff] [review] use the profile dir Review of attachment 772367 [details] [diff] [review]: ----------------------------------------------------------------- I kind of wish we had a do_get_tempdir() that returned the same directory but didn't set up the profile directory service provider, since tests like these don't actually need it, but it's not actively harmful. ::: toolkit/crashreporter/test/unit/crasher_subprocess_head.js @@ +6,5 @@ > +// get the profile dir > +let env = Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment); > +let file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); > +file.initWithPath(env.get("XPCSHELL_TEST_PROFILE_DIR")); > +let _profd = file; You could just s/file/profd/ and drop the second variable assignment.
Attachment #772367 - Flags: review?(ted) → review+
Attached patch use the profile dir (obsolete) — Splinter Review
Comment on attachment 772816 [details] [diff] [review] use the profile dir updated
Attachment #772816 - Flags: review+
Attachment #772367 - Attachment is obsolete: true
Depends on: 892021
Not sure if I should also make this change in the crashreporter tests themselves. It seems like it's enough to do it in the xpcshell/head.js file.
Attachment #773471 - Flags: review?(ted)
Attachment #772816 - Attachment is obsolete: true
(In reply to Mihnea Dobrescu-Balaur (:mihneadb) from comment #15) > Created attachment 773471 [details] [diff] [review] > use the new do_get_tempdir method in head.js > > Not sure if I should also make this change in the crashreporter tests > themselves. > It seems like it's enough to do it in the xpcshell/head.js file. Actually we don't even have access to head.js in crasher_subprocess_head.js.
Yeah, not really worthwhile, the subprocess isn't actually running xpcshell tests, it's just there to crash.
Attachment #773471 - Attachment is obsolete: true
Attachment #773471 - Flags: review?(ted)
Comment on attachment 773556 [details] [diff] [review] changed to the new do_get_tempdir() implementation Review of attachment 773556 [details] [diff] [review]: ----------------------------------------------------------------- Nice, thanks!
Attachment #773556 - Flags: review?(ted) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
I missed it in review, but this patch broke getting crash stacks for xpcshell tests :-( I pushed a fix: https://hg.mozilla.org/integration/mozilla-inbound/rev/971beabe0237
Whiteboard: [checkin-needed-aurora]
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: