TestWebKitAPI.AppleLanguagesTest.UpdateAppleLanguages is timing out on the (new) Big Sur Apple Silicon bots https://build.webkit.org/#/builders/103/builds/19/steps/11/logs/stdio https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.AppleLanguagesTest.UpdateAppleLanguages
This test was recently added with https://trac.webkit.org/changeset/273904/webkit, it does not appear to be timing out on the intel-based bots.
<rdar://problem/75110764>
I have temporarily disabled the test on Apple Silicon in https://commits.webkit.org/235113 because it was causing trouble on the bots.
ENABLE_CFPREFS_DIRECT_MODE seems to be enabled on Apple Silicon too so I don't see why the preference observer would not observe the AppleLanguages preference changing...
Tentatively re-enabling the test in http://trac.webkit.org/r276985 to see if the test is still failing and what its output looks like.
It is still failing, this time with this error: ``` /Volumes/Data/worker/bigsur-release/build/Tools/TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm:131 Value of: didChangeLanguage Actual: false Expected: true TestWebKitAPI.AppleLanguagesTest.UpdateAppleLanguages Failed ```
My bet is that this is a WebContent sandboxing issue. I see in our sandbox profile that some rules are CPU-specific. Sadly, I do not have a M1 to debug this.
Note that the test is flaky on Apple Silicon rather than 100% failing. As a result, this seems to be a potential timing issue.
(In reply to Chris Dumez from comment #8) > Note that the test is flaky on Apple Silicon rather than 100% failing. As a > result, this seems to be a potential timing issue. According to the flakiness dashboard, the test is also flaky on Intel. However, due to timing, the test is almost always passing on Intel and almost always failing on Apple Silicon.
With some extra logging and Alexey's help, I was able to figure out that the WKPreferenceObserver does get constructed WKPreferenceObserver.preferenceDidChange does not get called when I update AppleLanguages. Something seems unreliable with the WKPreferenceObserver. Now that I have found Bug 221848, maybe this is not too surprising. It seems many of the WKPreferenceObserver API tests are currently disabled due to flakiness.
This test is now flaky failing on Intel almost always since 7/12/21, r279855.