Bug 204967 - Make it possible to add regression tests for blocked XPC services
Summary: Make it possible to add regression tests for blocked XPC services
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: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-06 16:23 PST by Per Arne Vollan
Modified: 2019-12-10 15:39 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.85 KB, patch)
2019-12-06 16:26 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (2.91 KB, patch)
2019-12-06 16:41 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (3.31 KB, patch)
2019-12-09 10:50 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2019-12-06 16:23:03 PST
On macOS and iOS, it should be possible to add regression tests for blocked mach services.
Comment 1 Per Arne Vollan 2019-12-06 16:23:28 PST
rdar://problem/57414291
Comment 2 Per Arne Vollan 2019-12-06 16:26:48 PST
Created attachment 385054 [details]
Patch
Comment 3 Per Arne Vollan 2019-12-06 16:41:55 PST
Created attachment 385058 [details]
Patch
Comment 4 Alexey Proskuryakov 2019-12-06 17:19:21 PST
Comment on attachment 385058 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        to Internals, which checks whether the WebContent process has access to mach lookup for a given global

Good idea! I do not see why this should be limited to WebContent - sandbox_check can check other processes too. May be worth adding a universal method right away.
Comment 5 Per Arne Vollan 2019-12-09 10:50:08 PST
Created attachment 385167 [details]
Patch
Comment 6 Per Arne Vollan 2019-12-09 10:51:49 PST
(In reply to Alexey Proskuryakov from comment #4)
> Comment on attachment 385058 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=385058&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +        to Internals, which checks whether the WebContent process has access to mach lookup for a given global
> 
> Good idea! I do not see why this should be limited to WebContent -
> sandbox_check can check other processes too. May be worth adding a universal
> method right away.

Credits go to Geoff and Darin :)

I have added a process name parameter to the method.

Thanks for reviewing!
Comment 7 Brent Fulgham 2019-12-10 15:00:50 PST
Comment on attachment 385167 [details]
Patch

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

> Source/WebCore/testing/Internals.cpp:5337
> +    if (process == "com.apple.WebKit.WebContent")

What about WebContent.Development?
Comment 8 Per Arne Vollan 2019-12-10 15:08:47 PST
(In reply to Brent Fulgham from comment #7)
> Comment on attachment 385167 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=385167&action=review
> 
> > Source/WebCore/testing/Internals.cpp:5337
> > +    if (process == "com.apple.WebKit.WebContent")
> 
> What about WebContent.Development?

This string will be passed from the layout test html file, and will be the same for both debug and release builds, so I don't think we need to include a check for WebContent.Development in this case.

Thanks for reviewing!
Comment 9 Brent Fulgham 2019-12-10 15:15:15 PST
Comment on attachment 385167 [details]
Patch

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

R=me

>>> Source/WebCore/testing/Internals.cpp:5337
>>> +    if (process == "com.apple.WebKit.WebContent")
>> 
>> What about WebContent.Development?
> 
> This string will be passed from the layout test html file, and will be the same for both debug and release builds, so I don't think we need to include a check for WebContent.Development in this case.
> 
> Thanks for reviewing!

Very good!
Comment 10 Per Arne Vollan 2019-12-10 15:18:03 PST
(In reply to Brent Fulgham from comment #9)
> Comment on attachment 385167 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=385167&action=review
> 
> R=me
> 
> >>> Source/WebCore/testing/Internals.cpp:5337
> >>> +    if (process == "com.apple.WebKit.WebContent")
> >> 
> >> What about WebContent.Development?
> > 
> > This string will be passed from the layout test html file, and will be the same for both debug and release builds, so I don't think we need to include a check for WebContent.Development in this case.
> > 
> > Thanks for reviewing!
> 
> Very good!

Thanks for reviewing :)
Comment 11 WebKit Commit Bot 2019-12-10 15:39:21 PST
Comment on attachment 385167 [details]
Patch

Clearing flags on attachment: 385167

Committed r253353: <https://trac.webkit.org/changeset/253353>
Comment 12 WebKit Commit Bot 2019-12-10 15:39:23 PST
All reviewed patches have been landed.  Closing bug.