forked from BrowserWorks/Waterfox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1550034 - avoid most failures of the browser_startup_mainthreadio…
….js and browser_startup_content_mainthreadio.js tests. r=mconley a=test-only CLOSED TREE This patch contains the following changes: - upload a startup profile when there are unused mainthread I/O whitelist entries, - avoid 'unused whitelist entry' failures in devedition beta builds (where the IOInterposer is ifdef'ed out) while keeping coverage that ensures we are able to produce valid startup profiles, - completely disable on Windows Arm64 where the IO interposer is broken, - mark as ignoreIfUnused the whitelist entry that caused most intermittent failures. Differential Revision: https://phabricator.services.mozilla.com/D31268 --HG-- extra : source : 742a8ae0110dc3d862a637e4348b587fe431938f
- Loading branch information
Showing
3 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,7 @@ const processes = { | |
{ // bug 1357205 | ||
path: "XREAppFeat:[email protected]", | ||
condition: !WIN, | ||
ignoreIfUnused: true, | ||
stat: 1, | ||
}, | ||
], | ||
|
@@ -344,6 +345,20 @@ add_task(async function() { | |
} | ||
} | ||
|
||
if (!whitelist.length) { | ||
continue; | ||
} | ||
// The I/O interposer is disabled if !RELEASE_OR_BETA, so we expect to have | ||
// no I/O marker in that case, but it's good to keep the test running to check | ||
// that we are still able to produce startup profiles. | ||
is(markers.length > 0, !AppConstants.RELEASE_OR_BETA, | ||
procName + " startup profiles should have IO markers in builds that are not RELEASE_OR_BETA"); | ||
if (!markers.length) { | ||
// If a profile unexpectedly contains no I/O marker, avoid generating | ||
// plenty of confusing "unused whitelist entry" failures. | ||
continue; | ||
} | ||
|
||
for (let entry of whitelist) { | ||
for (let op in entry) { | ||
if (["path", "condition", "ignoreIfUnused", "_used"].includes(op)) { | ||
|
@@ -361,6 +376,7 @@ add_task(async function() { | |
} | ||
if (!("_used" in entry) && !entry.ignoreIfUnused) { | ||
ok(false, `unused whitelist entry ${procName}: ${entry.path}`); | ||
shouldPass = false; | ||
} | ||
} | ||
} | ||
|
@@ -377,7 +393,7 @@ add_task(async function() { | |
await OS.File.writeAtomic(profilePath, | ||
encoder.encode(JSON.stringify(startupRecorder.data.profile))); | ||
ok(false, | ||
"Found some unexpected main thread I/O during child process startup; " + | ||
"Unexpected main thread I/O behavior during child process startup; " + | ||
"profile uploaded in " + filename); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters