Closed
Bug 922465
Opened 11 years ago
Closed 11 years ago
Automated tests for the Nuwa process
Categories
(Core :: IPC, defect)
Tracking
()
People
(Reporter: cyu, Assigned: kk1fff)
References
Details
Attachments
(1 file, 4 obsolete files)
(deleted),
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
The Nuwa templated content process is now disabled by default. We need to add automated tests for turning it on.
Assignee | ||
Comment 1•11 years ago
|
||
Test to observe NuwaReady. This basically works if we startup emulator only for this test case, since the preallocated process is not there then, we can observe it's event. But if the emulator has already run many tests before running this, we will need to restart the preallocated process. The preference observer doesn't seem work, I am still finding a way to restart it.
Attachment #819300 -
Flags: feedback?(cyu)
Reporter | ||
Comment 2•11 years ago
|
||
Comment on attachment 819300 [details] [diff] [review]
WIP: Observe Nuwa process creation.
Review of attachment 819300 [details] [diff] [review]:
-----------------------------------------------------------------
This test looks good, but we need to consider for the failure path and don't block the whole test suite if RecvNuwaReady() is never called.
If for some reason the Nuwa process won't be ready, we need to timeout and fail the test explicitly. The timeout value can be a loose, but not too big, value. 1 min is a safe value, I guess.
Attachment #819300 -
Flags: feedback?(cyu)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → pwang
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #819300 -
Attachment is obsolete: true
Assignee | ||
Comment 4•11 years ago
|
||
Current status of test case: since running program in emulator is slower than in a real device, we are likely to be affected by bug 941466. It would result in all test cases time out once Nuwa is turned on.
Cervantes suggests we turn off PreloadSlowThings in emulator prevent asynchrous events from being dispatched after start to freeze. I tested turing off PreloadSlowThings on try server, the tests cases are all passed. I think we can turn off PreloadSlowThings on emulator for now, and re-enable it after we fixed bug 941466.
I don't really like the idea of turning off PreloadSlowThings in the emulator because it means that we're no longer testing the same code that we're shipping. We have every reason to believe that users will hit this.
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #823988 -
Attachment is obsolete: true
Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 8340314 [details] [diff] [review]
Test nuwa creation and fork new process.
Review of attachment 8340314 [details] [diff] [review]:
-----------------------------------------------------------------
Kyle, could you help review this patch?
Attachment #8340314 -
Flags: review?(khuey)
Assignee | ||
Updated•11 years ago
|
blocking-b2g: --- → 1.3?
Comment on attachment 8340314 [details] [diff] [review]
Test nuwa creation and fork new process.
Review of attachment 8340314 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/ipc/PreallocatedProcessManager.cpp
@@ +285,5 @@
> + nsCOMPtr<nsIMessageBroadcaster> ppmm =
> + do_GetService("@mozilla.org/parentprocessmessagemanager;1");
> + nsresult rv = ppmm->BroadcastAsyncMessage(
> + NS_LITERAL_STRING("TEST-ONLY:nuwa-add-new-process"),
> + JSVAL_NULL, JSVAL_NULL, AutoJSContext(), 1);
AutoJSContext cannot be used as a temporary. If you ran this in a debug build it would assert at http://mxr.mozilla.org/mozilla-central/source/mfbt/GuardObjects.h#97
@@ +324,5 @@
> + nsCOMPtr<nsIMessageBroadcaster> ppmm =
> + do_GetService("@mozilla.org/parentprocessmessagemanager;1");
> + nsresult rv = ppmm->BroadcastAsyncMessage(
> + NS_LITERAL_STRING("TEST-ONLY:nuwa-ready"),
> + JSVAL_NULL, JSVAL_NULL, AutoJSContext(), 1);
Same here.
Attachment #8340314 -
Flags: review?(khuey) → review-
Assignee | ||
Comment 9•11 years ago
|
||
I just realized AutoJSContext cannot be used as a temporary object. Thank for catching this, Kyle.
Attachment #8340314 -
Attachment is obsolete: true
Attachment #8343593 -
Flags: review?(khuey)
Assignee | ||
Comment 10•11 years ago
|
||
Remove redundant log message from test_NuwaProcessCreation.html
Attachment #8343593 -
Attachment is obsolete: true
Attachment #8343593 -
Flags: review?(khuey)
Attachment #8343606 -
Flags: review?(khuey)
Comment on attachment 8343606 [details] [diff] [review]
Patch: Test nuwa creation and fork new process.
Review of attachment 8343606 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/ipc/tests/test_NuwaProcessCreation.html
@@ +75,5 @@
> + };
> + let timeout = setTimeout(function() {
> + ok(false, "Nuwa process is not launched");
> + testEnd();
> + }, 60000);
Do we really need to wait a full minute here?
Attachment #8343606 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #11)
> Do we really need to wait a full minute here?
It won't take that long if test pass. If we get the two message, we can finish the test. Setting 1 minute is because emulator is slower then real device.
Assignee | ||
Comment 13•11 years ago
|
||
Comment 14•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Comment 15•11 years ago
|
||
Backed out in https://hg.mozilla.org/mozilla-central/rev/06b3a7aea2c0 for frequent (somewhere between 20 and 50%) xpcshell shutdown crashes like https://tbpl.mozilla.org/php/getParsedLog.php?id=31651189&tree=B2g-Inbound
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla28 → ---
Assignee | ||
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Comment 19•11 years ago
|
||
Updated•11 years ago
|
status-b2g-v1.3:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•