Bug 201616 - WebKitTestRunner: Many tests timeout on macOS Catalina
Summary: WebKitTestRunner: Many tests timeout on macOS Catalina
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-09 15:33 PDT by Jonathan Bedard
Modified: 2019-10-01 18:50 PDT (History)
16 users (show)

See Also:


Attachments
Patch (1.22 KB, patch)
2019-10-01 15:04 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.17 KB, patch)
2019-10-01 15:22 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.17 KB, patch)
2019-10-01 16:54 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2019-09-09 15:33:13 PDT
When I try to run tests on macOS Catalina, hundreds of tests are timing out, mostly http tests. Many of the tests I'm seeing timeout involve ResourceLoadStatistics, although it's possible other features are also effected.

In http/tests/cache, the following tests are timing out:

    http/tests/cache/link-prefetch-main-resource-iframe.html [ Timeout ]
    http/tests/cache/link-prefetch-main-resource.html [ Timeout ]
    http/tests/cache/partitioned-cache-iframe.html [ Timeout ]
    http/tests/cache/partitioned-cache.html [ Timeout ]
    http/tests/cache/xhr-vary-header.html [ Timeout ]
Comment 1 Radar WebKit Bug Importer 2019-09-09 15:33:37 PDT
<rdar://problem/55200897>
Comment 2 Jonathan Bedard 2019-09-26 21:49:48 PDT
I originally thought this was because of where we were saving files, but testing today indicates that it has to do with hanging on https.
Comment 3 Jonathan Bedard 2019-10-01 09:27:35 PDT
I have a pretty basic reproduction case, which took me awhile to figure out because I am still not clear on how this would happen.

In short, with http/tests/security/contentSecurityPolicy/1.1/base-uri-allow.html, the test runner is never even attempting to retrieve the other resources. This will completely break many http tests in various different ways. It doesn't seem to be apache, because I can retrieve these files fine via curl, and this test even works if I run it in the browser while the http server is running. So this would seem to be a problem in the test runner.
Comment 4 Jonathan Bedard 2019-10-01 11:21:27 PDT
This is an entitlement problem:

"com.apple.WebKit(####) does not hold the necessary entitlement to delegate network traffic for other processes by pid"
Comment 5 Jonathan Bedard 2019-10-01 15:04:34 PDT
Created attachment 379953 [details]
Patch
Comment 6 Jonathan Bedard 2019-10-01 15:05:26 PDT
(In reply to Jonathan Bedard from comment #5)
> Created attachment 379953 [details]
> Patch

This fixes the problem...doing some additional testing, but I wanted to put the patch up for review.
Comment 7 Alex Christensen 2019-10-01 15:08:27 PDT
Comment on attachment 379953 [details]
Patch

Let's keep it on for all IOS_FAMILY builds but only turn it off for open source Catalina builds.
Comment 8 Jonathan Bedard 2019-10-01 15:22:19 PDT
Created attachment 379954 [details]
Patch
Comment 9 Jonathan Bedard 2019-10-01 15:26:28 PDT
(In reply to Alex Christensen from comment #7)
> Comment on attachment 379953 [details]
> Patch
> 
> Let's keep it on for all IOS_FAMILY builds but only turn it off for open
> source Catalina builds.

Fair point.
Comment 10 Alexey Proskuryakov 2019-10-01 16:43:07 PDT
Comment on attachment 379954 [details]
Patch

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

> Source/WTF/wtf/Platform.h:1387
> +#if (PLATFORM(MAC) && defined USE_APPLE_INTERNAL_SDK && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)

This should be USE(APPLE_INTERNAL_SDK), not USE_APPLE_INTERNAL_SDK.
Comment 11 Jonathan Bedard 2019-10-01 16:54:59 PDT
Created attachment 379968 [details]
Patch
Comment 12 WebKit Commit Bot 2019-10-01 18:50:31 PDT
Comment on attachment 379968 [details]
Patch

Clearing flags on attachment: 379968

Committed r250590: <https://trac.webkit.org/changeset/250590>
Comment 13 WebKit Commit Bot 2019-10-01 18:50:33 PDT
All reviewed patches have been landed.  Closing bug.