Bug 231586 - [ iOS ] http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py is a flaky failure
Summary: [ iOS ] http/tests/resourceLoadStatistics/switch-session-on-navigation-to-pre...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-12 09:41 PDT by ayumi_kojima
Modified: 2021-10-21 09:50 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ayumi_kojima 2021-10-12 09:41:43 PDT
http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py

Is a flaky failure on iOS (15).

History: https://results.webkit.org/?suite=layout-tests&test=http%2Ftests%2FresourceLoadStatistics%2Fswitch-session-on-navigation-to-prevalent-without-interaction.py

Result page: https://build.webkit.org/results/Apple-iPadOS-15-Simulator-Debug-WK2-Tests/r283966%20(61)/results.html

Diff:

--- /Volumes/Data/worker/ipados-simulator-15-debug-tests-wk2/build/layout-test-results/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction-expected.txt
+++ /Volumes/Data/worker/ipados-simulator-15-debug-tests-wk2/build/layout-test-results/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction-actual.txt
@@ -5,8 +5,9 @@
 
 PASS Should have and has the session cookie.
 PASS Should have and has the persistent cookie.
-PASS Origin has isolated session.
+FAIL Origin has no isolated session.
 PASS successfullyParsed is true
+Some tests failed.
 
 TEST COMPLETE
Comment 1 Radar WebKit Bug Importer 2021-10-12 09:43:54 PDT
<rdar://problem/84151527>
Comment 2 ayumi_kojima 2021-10-12 09:48:44 PDT
Marked test expectations https://trac.webkit.org/changeset/283989/webkit
Comment 3 ayumi_kojima 2021-10-12 10:34:37 PDT
I was not able to reproduce the failure locally using run-webkit-tests --ios-simulator --iterations 50 --exit-after-n-failures 1 http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py --force
Comment 4 Chris Dumez 2021-10-12 12:23:32 PDT
Based on the Apache Access log, I think we fail on step 1:
case "#step1":
                setSessionCookie();
                setPersistentCookie();
                checkCookies(true, true);
                if (testRunner.hasStatisticsIsolatedSession(prevalentOrigin))
                    testPassed("Origin has isolated session.");
                else {
                    testFailed("Origin has no isolated session.");
                    setEnableFeature(false, finishJSTest);
                }
                document.location.href = nonPrevalentOrigin + "/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py#step2";
                break;


I am unclear why the session would not be recognized as isolated, since sessions are isolated unconditionally nowadays. I could only see 2 reasons:
1. We have not done any loads for that origin yet. This seems unlikely since the origin in question is "http://127.0.0.1:8000" and we should have just loaded the main resource of the test from this origin.
2. Something is clearing the isolated session. I do see there is a NetworkSessionCocoa::clearIsolatedSessions() for e.g.
Comment 5 Chris Dumez 2021-10-12 15:29:13 PDT
I haven't been able to reproduce on iOS simulator so far and I currently don't have any idea of how this could fail.
Comment 6 Chris Dumez 2021-10-21 09:50:06 PDT
This test no longer exists. It was reverted.