Bug 205807 - REGRESSION: [ Mac Debug ] inspector/page/setBootstrapScript-main-frame.html is a flaky failure
Summary: REGRESSION: [ Mac Debug ] inspector/page/setBootstrapScript-main-frame.html i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-06 09:50 PST by Truitt Savell
Modified: 2020-01-07 12:17 PST (History)
6 users (show)

See Also:


Attachments
Patch (6.34 KB, patch)
2020-01-06 15:56 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (6.62 KB, patch)
2020-01-07 11:15 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Truitt Savell 2020-01-06 09:50:38 PST
inspector/page/setBootstrapScript-main-frame.html

Description:
This test is a flaky failure on Mac Debug. This test has been flakey for at least several months. I do not have a starting point at this time. It was first added in https://trac.webkit.org/changeset/251531/webkit so this test may have been flaky from introduction.

History:
https://results.webkit.org/?suite=layout-tests&test=inspector%2Fpage%2FsetBootstrapScript-main-frame.html&limit=10000

Diff:
--- /Volumes/Data/slave/catalina-debug-tests-wk2/build/layout-test-results/inspector/page/setBootstrapScript-main-frame-expected.txt
+++ /Volumes/Data/slave/catalina-debug-tests-wk2/build/layout-test-results/inspector/page/setBootstrapScript-main-frame-actual.txt
@@ -6,5 +6,7 @@
 PASS: 'valueFromBootstrapScript' should be 'undefined'.
 Setting bootstrap script...
 Reloading page...
-PASS: 'valueFromBootstrapScript' should be '42'.
+FAIL: 'valueFromBootstrapScript' should be '42'.
+    Expected: 42
+    Actual: undefined
Comment 1 Radar WebKit Bug Importer 2020-01-06 09:50:52 PST
<rdar://problem/58344669>
Comment 2 Truitt Savell 2020-01-06 09:56:39 PST
marked test as failing while it is investigated: https://trac.webkit.org/changeset/254059/webkit
Comment 3 Devin Rousso 2020-01-06 15:56:11 PST
Created attachment 386906 [details]
Patch

It took a while (over 10000 iterations), but I was finally able to reproduce this locally.  I'm not 100% sure whether all of them are actually necessary to fix this issue, but I do think all of them are necessary overall (e.g. some may effectively be a drive-by), and since it seems to reproduce so infrequently for me, I'd rather put the patch up and get it tested/landed than take the (likely long) time to try to bisect what actually fixed it among these changes.
Comment 4 Dean Jackson 2020-01-07 01:04:17 PST
Comment on attachment 386906 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=386906&action=review

> Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js:1432
> +        let source = this._bootstrapScript.content || "";

Use ?? ? (wouldn't matter here though).

Also, this can be const.
Comment 5 Devin Rousso 2020-01-07 11:07:58 PST
Comment on attachment 386906 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=386906&action=review

>> Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js:1432
>> +        let source = this._bootstrapScript.content || "";
> 
> Use ?? ? (wouldn't matter here though).
> 
> Also, this can be const.

In this case, I'd prefer `||` as I would also want to switch to a string in the case that `this._bootstrapScript.content` was actually `false`.  Frankly, this code is probably unnecessary, but it can't hurt ¯\_(ツ)_/¯

Web Inspector style is to only use `const` for values that don't change between sessions, like literal constant values.
Comment 6 WebKit Commit Bot 2020-01-07 11:10:50 PST Comment hidden (obsolete)
Comment 7 Devin Rousso 2020-01-07 11:15:56 PST
Created attachment 387000 [details]
Patch
Comment 8 WebKit Commit Bot 2020-01-07 12:16:54 PST
The commit-queue encountered the following flaky tests while processing attachment 387000 [details]:

imported/w3c/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/content/002.xhtml bug 205881 (author: cdumez@apple.com)
transitions/default-timing-function.html bug 138901 (authors: dino@apple.com and graouts@apple.com)
The commit-queue is continuing to process your patch.
Comment 9 WebKit Commit Bot 2020-01-07 12:17:48 PST
Comment on attachment 387000 [details]
Patch

Clearing flags on attachment: 387000

Committed r254145: <https://trac.webkit.org/changeset/254145>
Comment 10 WebKit Commit Bot 2020-01-07 12:17:50 PST
All reviewed patches have been landed.  Closing bug.