Closed
Bug 983692
Opened 12 years ago
Closed 11 years ago
PJS: Rewrite testing mechanism to use magic globals rather than magic parameters
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: nmatsakis, Unassigned)
References
Details
Attachments
(1 obsolete file)
To make reproducible tests, we need to be able to run things like `mapPar` in distinct modes (force parallel, etc). Unfortunately, the mechanism we used for this was to pass an extra argument. This means it's available to end users, which is bad. I think the right mechanism, though it's a bit hacky, is to have some global variable in ForkJoin.cpp (or in the context, maybe) storing the current mode, and expose some functions in TestingFunctions.cpp for modifying this value. This way we can be sure that in production firefox the mode is never changed. It also avoids us having to figure out how to thread mode arguments everywhere and makes writing the tests more reliable (if you neglect to thread the mode, the various helpers like `assertParallelExecSucceeds` don't work).
Reporter | ||
Comment 1•12 years ago
|
||
Note: we might also want to disable work stealing in some exec modes. In particular, it can hide bugs if one thread (e.g., the main thread) steals all the work.
Reporter | ||
Comment 2•12 years ago
|
||
(And has actively done so already, though I can't be bothered to fish up the bug # right now)
Reporter | ||
Comment 3•12 years ago
|
||
This seems to work via manual inspection.
Attachment #8391278 -
Flags: review?(shu)
Reporter | ||
Comment 4•12 years ago
|
||
Attachment #8391278 -
Attachment is obsolete: true
Attachment #8391278 -
Flags: review?(shu)
Updated•11 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•