Bug 185486 - Update WebKit.WebsiteDataStoreCustomPaths after r231536
Summary: Update WebKit.WebsiteDataStoreCustomPaths after r231536
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: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-09 13:21 PDT by Sihui Liu
Modified: 2018-05-10 07:01 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.78 KB, patch)
2018-05-09 13:31 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (1.77 KB, patch)
2018-05-09 14:35 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2018-05-09 13:21:38 PDT
_syncNetworkProcessCookies is completely async after r231536, so we need to update the test using this API.
Comment 1 Sihui Liu 2018-05-09 13:23:06 PDT
<rdar://problem/37214391>
Comment 2 Sihui Liu 2018-05-09 13:31:58 PDT
Created attachment 340015 [details]
Patch
Comment 3 Chris Dumez 2018-05-09 13:35:07 PDT
Comment on attachment 340015 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:150
> +        TestWebKitAPI::Util::spinRunLoop(1);

I am worried this could still be flaky. How do we know that spinning the runloop 10 times will be sufficient for us:
1. Sending the async IPC to the network process
2. The network process receiving the IPC and asking CFNetwork do sync the cookies
3. Cookies are done sync'ing by the CFNetwork.
Comment 4 Sihui Liu 2018-05-09 14:35:01 PDT
Created attachment 340028 [details]
Patch
Comment 5 Sihui Liu 2018-05-09 14:37:23 PDT
(In reply to Chris Dumez from comment #3)
> Comment on attachment 340015 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=340015&action=review
> 
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:150
> > +        TestWebKitAPI::Util::spinRunLoop(1);
> 
> I am worried this could still be flaky. How do we know that spinning the
> runloop 10 times will be sufficient for us:
> 1. Sending the async IPC to the network process
> 2. The network process receiving the IPC and asking CFNetwork do sync the
> cookies
> 3. Cookies are done sync'ing by the CFNetwork.

We don't know. I've changed it to use sleep since second seems to be a better unit for estimation.
Comment 6 Chris Dumez 2018-05-09 14:40:59 PDT
Comment on attachment 340028 [details]
Patch

I would have been more generous than 3 seconds given our slow bots but let's try...
Comment 7 WebKit Commit Bot 2018-05-09 15:35:44 PDT
Comment on attachment 340028 [details]
Patch

Clearing flags on attachment: 340028

Committed r231603: <https://trac.webkit.org/changeset/231603>
Comment 8 WebKit Commit Bot 2018-05-09 15:35:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-05-09 16:09:00 PDT
<rdar://problem/40110684>
Comment 10 Alexey Proskuryakov 2018-05-09 23:22:00 PDT
Comment on attachment 340028 [details]
Patch

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

> Tools/ChangeLog:9
> +        Update WebKit.WebsiteDataStoreCustomPaths as _syncNetworkProcessCookies is async now.

"_syncNetworkProcessCookies is async"...
Comment 11 Chris Dumez 2018-05-10 07:01:23 PDT
(In reply to Alexey Proskuryakov from comment #10)
> Comment on attachment 340028 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=340028&action=review
> 
> > Tools/ChangeLog:9
> > +        Update WebKit.WebsiteDataStoreCustomPaths as _syncNetworkProcessCookies is async now.
> 
> "_syncNetworkProcessCookies is async"...

Sync means synchronize here, not synchronous :)