Bug 232982 - Get daemon API ready to work in the iOS simulator (starting with WebPushD)
Summary: Get daemon API ready to work in the iOS simulator (starting with WebPushD)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-10 20:15 PST by Brady Eidson
Modified: 2021-11-14 23:18 PST (History)
3 users (show)

See Also:


Attachments
Patch for EWS v2 (25.06 KB, patch)
2021-11-10 20:28 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS v2 (25.08 KB, patch)
2021-11-10 20:59 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS v3 (25.08 KB, patch)
2021-11-10 21:27 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS v4 (25.40 KB, patch)
2021-11-10 21:32 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS v5 (25.61 KB, patch)
2021-11-10 21:37 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS v6 (26.83 KB, patch)
2021-11-11 10:08 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS v7 (26.74 KB, patch)
2021-11-11 13:46 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS v8 (26.81 KB, patch)
2021-11-11 14:35 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS v9 (26.91 KB, patch)
2021-11-11 15:44 PST, Brady Eidson
ggaren: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing v1 (26.98 KB, patch)
2021-11-11 18:44 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing v2 (25.26 KB, patch)
2021-11-12 10:12 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing v3 (28.04 KB, patch)
2021-11-12 20:58 PST, Brady Eidson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing v4 (28.40 KB, patch)
2021-11-14 19:55 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2021-11-10 20:15:02 PST
Get daemon API tests working in the iOS simulator (starting with WebPushD.PermissionManagement)
Comment 1 Brady Eidson 2021-11-10 20:28:37 PST
Created attachment 443900 [details]
Patch for EWS v2
Comment 2 Brady Eidson 2021-11-10 20:59:29 PST
Created attachment 443902 [details]
Patch for EWS v2
Comment 3 Brady Eidson 2021-11-10 21:27:18 PST
Created attachment 443905 [details]
Patch for EWS v3
Comment 4 Brady Eidson 2021-11-10 21:32:55 PST
Created attachment 443906 [details]
Patch for EWS v4
Comment 5 Brady Eidson 2021-11-10 21:37:38 PST
Created attachment 443907 [details]
Patch for EWS v5
Comment 6 Brady Eidson 2021-11-11 10:08:44 PST
Created attachment 443964 [details]
Patch for EWS v6
Comment 7 Brady Eidson 2021-11-11 13:46:56 PST
Created attachment 443998 [details]
Patch for EWS v7
Comment 8 Brady Eidson 2021-11-11 14:35:16 PST
Created attachment 444004 [details]
Patch for EWS v8
Comment 9 Brady Eidson 2021-11-11 15:44:20 PST
Created attachment 444013 [details]
Patch for EWS v9
Comment 10 Geoffrey Garen 2021-11-11 16:53:41 PST
Comment on attachment 444013 [details]
Patch for EWS v9

r=me
Comment 11 Brady Eidson 2021-11-11 18:44:57 PST
Created attachment 444033 [details]
Patch for landing v1
Comment 12 Brady Eidson 2021-11-12 10:12:29 PST
Created attachment 444078 [details]
Patch for landing v2

Daemon failed to launch on the EWS bot, causing TestWebKitAPI crashes.

This patch fixes those crashes and turns them into "clean failures", but I'm still exploring why the daemon isn't launching.
Comment 13 Brady Eidson 2021-11-12 12:33:45 PST
Okay I figured out the difference between my setup and what the bots are doing.

Locally, we often symlink our built frameworks into the sim runtime.
When I did that, the tests were working great.

If I undo that and just rely on the run-api-tests script like the bots do, I get the same "daemon won't launch" failure.

Trying to figure out the difference now.
Comment 14 Brady Eidson 2021-11-12 16:32:26 PST
TL;DR

OSLaunchdJob + the simulator require us to pass a daemon path relative to the runtime root.

But run-api-tests just sets a whole bunch of Mac-relative DYLD* paths, and we don't actually *have* anything installed inside the runtime root.

Jonathan helped me brainstorm possible solutions an has volunteered to hack on run-api-tests to implement a solution that seems reasonable.
Comment 15 Brady Eidson 2021-11-12 17:08:08 PST
(In reply to Brady Eidson from comment #14)
> TL;DR
> 
> OSLaunchdJob + the simulator require us to pass a daemon path relative to
> the runtime root.
> 
> But run-api-tests just sets a whole bunch of Mac-relative DYLD* paths, and
> we don't actually *have* anything installed inside the runtime root.
> 
> Jonathan helped me brainstorm possible solutions an has volunteered to hack
> on run-api-tests to implement a solution that seems reasonable.

https://bugs.webkit.org/show_bug.cgi?id=232982 for that change.

I'll be testing changes to this patch with that one applied \o/
Comment 16 Brady Eidson 2021-11-12 17:09:00 PST
(In reply to Brady Eidson from comment #15)> 
> https://bugs.webkit.org/show_bug.cgi?id=232982 for that change.
> 
> I'll be testing changes to this patch with that one applied \o/

I, of course, meant https://bugs.webkit.org/show_bug.cgi?id=233080
Comment 17 Brady Eidson 2021-11-12 20:58:02 PST
Created attachment 444133 [details]
Patch for landing v3
Comment 18 Brady Eidson 2021-11-14 19:52:19 PST
Retitling:
        Get daemon API ready to work in the iOS simulator (starting with WebPushD)

Because I'm going to land this patch as-is - doing all the groundwork to enable the daemon tests - but still disabled until we resolve the "how to get the daemon executable visible inside the runtime root" patch
Comment 19 Brady Eidson 2021-11-14 19:55:41 PST
Created attachment 444209 [details]
Patch for landing v4
Comment 20 EWS 2021-11-14 23:17:43 PST
Committed r285799 (244243@main): <https://commits.webkit.org/244243@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444209 [details].
Comment 21 Radar WebKit Bug Importer 2021-11-14 23:18:21 PST
<rdar://problem/85400420>