WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
206858
Reset the application bundle identifier between test runs
https://bugs.webkit.org/show_bug.cgi?id=206858
Summary
Reset the application bundle identifier between test runs
Brent Fulgham
Reported
2020-01-27 17:50:09 PST
In
Bug 205316
we added new infrastructure to allow us to switch Application Bundle Identifier for testing purposes. Unfortunately, this is creating some "crashes" on our bots (without stack traces) because of the following code: if (m_hasSetApplicationBundleIdentifier) { // Exit if the application bundle identifier has already been set, since it can only be set once. exit(1); } This is a problem, because WKTR streams test input, and may interleave ‘com.apple.mail’ tests with “no-bundle-id” tests, which triggers this exit. We should clear the bundle identifier state once a test ends, so that it is in a good state for the next test run.
Attachments
Patch
(1.42 KB, patch)
2020-01-27 17:52 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(2.77 KB, patch)
2020-01-28 09:51 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(9.28 KB, patch)
2020-01-28 12:15 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch for landing
(9.28 KB, patch)
2020-01-28 12:39 PST
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2020-01-27 17:50:27 PST
<
rdar://problem/58844002
>
Brent Fulgham
Comment 2
2020-01-27 17:52:57 PST
Created
attachment 388951
[details]
Patch
Per Arne Vollan
Comment 3
2020-01-28 08:30:44 PST
Comment on
attachment 388951
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=388951&action=review
Thanks for tracking this down!
> Tools/WebKitTestRunner/TestController.cpp:1089 > + setApplicationBundleIdentifier(String());
I wonder if this could hit an assert since it would set the bundle identifier after it has been queried?
Maciej Stachowiak
Comment 4
2020-01-28 09:31:00 PST
Comment on
attachment 388951
[details]
Patch Need to fix the build errors on gtk, wee, wincairo and win, assuming they are caused by this patch. Otherwise looks good.
Brent Fulgham
Comment 5
2020-01-28 09:51:25 PST
Created
attachment 389019
[details]
Patch
Brent Fulgham
Comment 6
2020-01-28 09:58:13 PST
(In reply to Maciej Stachowiak from
comment #4
)
> Comment on
attachment 388951
[details]
> Patch > > Need to fix the build errors on gtk, wee, wincairo and win, assuming they > are caused by this patch. Otherwise looks good.
Done.
Brent Fulgham
Comment 7
2020-01-28 09:58:43 PST
(In reply to Per Arne Vollan from
comment #3
)
> Comment on
attachment 388951
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=388951&action=review
> > Thanks for tracking this down! > > > Tools/WebKitTestRunner/TestController.cpp:1089 > > + setApplicationBundleIdentifier(String()); > > I wonder if this could hit an assert since it would set the bundle > identifier after it has been queried?
I think you are right. I think I need to make a 'clear' method that will reset that value too. These tests run on device in Release build, so I didn't notice this.
Per Arne Vollan
Comment 8
2020-01-28 10:50:31 PST
(In reply to Brent Fulgham from
comment #7
)
> (In reply to Per Arne Vollan from
comment #3
) > > Comment on
attachment 388951
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=388951&action=review
> > > > Thanks for tracking this down! > > > > > Tools/WebKitTestRunner/TestController.cpp:1089 > > > + setApplicationBundleIdentifier(String()); > > > > I wonder if this could hit an assert since it would set the bundle > > identifier after it has been queried? > > I think you are right. I think I need to make a 'clear' method that will > reset that value too. These tests run on device in Release build, so I > didn't notice this.
We pass the bundle identifier on to the Networking and WebContent process when they are started as well. There might be a risk of ending up with different bundle identifiers for the various processes. Would it be possible to find a way of exiting more "cleanly", so that it will not get picked up as a crash by the scripts? Is this based on return value?
Brent Fulgham
Comment 9
2020-01-28 12:15:12 PST
Created
attachment 389048
[details]
Patch
Per Arne Vollan
Comment 10
2020-01-28 12:23:03 PST
Comment on
attachment 389048
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=389048&action=review
Looks good! Should we also delete the code which exits, and the associated flag? R=me.
> Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm:72 > + applicationBundleIdentifierOverride() = String();
emptyString()?
Brent Fulgham
Comment 11
2020-01-28 12:39:19 PST
Comment on
attachment 389048
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=389048&action=review
>> Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm:72 >> + applicationBundleIdentifierOverride() = String(); > > emptyString()?
Good idea.
Brent Fulgham
Comment 12
2020-01-28 12:39:37 PST
Created
attachment 389050
[details]
Patch for landing
Brent Fulgham
Comment 13
2020-01-28 12:40:24 PST
(In reply to Per Arne Vollan from
comment #10
)
> Comment on
attachment 389048
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=389048&action=review
> > Looks good! Should we also delete the code which exits, and the associated > flag? R=me.
No -- I think it's good to guard against something attempting to set the bundle identifier twice, or for us forgetting to clear it.
WebKit Commit Bot
Comment 14
2020-01-28 13:02:37 PST
Comment on
attachment 389050
[details]
Patch for landing Clearing flags on attachment: 389050 Committed
r255271
: <
https://trac.webkit.org/changeset/255271
>
WebKit Commit Bot
Comment 15
2020-01-28 13:02:39 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug