Bug 225703 - [TestWebKitAPI] Explicitly exit after completing tests
Summary: [TestWebKitAPI] Explicitly exit after completing tests
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: 2021-05-12 10:56 PDT by Jonathan Bedard
Modified: 2021-05-12 14:11 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.09 KB, patch)
2021-05-12 11:01 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.15 KB, patch)
2021-05-12 12:04 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 2021-05-12 10:56:44 PDT
Our API tests run in a non-standard way. We can't rely on the system to exit the process cleanly or immediately after returning from main because iOS does not ordinarily support command line programs.
Comment 1 Jonathan Bedard 2021-05-12 10:57:08 PDT
<rdar://problem/77673980>
Comment 2 Jonathan Bedard 2021-05-12 11:01:06 PDT
Created attachment 428385 [details]
Patch
Comment 3 Alexey Proskuryakov 2021-05-12 11:27:43 PDT
Comment on attachment 428385 [details]
Patch

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

> Tools/TestWebKitAPI/ios/mainIOS.mm:56
> -    return passed ? EXIT_SUCCESS : EXIT_FAILURE;
> +    exit(passed ? EXIT_SUCCESS : EXIT_FAILURE);

If this works, it works, but please add a comment linking to a radar that tracks investigating the root cause here.
Comment 4 Jonathan Bedard 2021-05-12 12:04:17 PDT
Created attachment 428397 [details]
Patch
Comment 5 EWS 2021-05-12 13:40:58 PDT
Committed r277387 (237643@main): <https://commits.webkit.org/237643@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428397 [details].
Comment 6 Darin Adler 2021-05-12 14:11:18 PDT
Comment on attachment 428397 [details]
Patch

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

> Tools/TestWebKitAPI/ios/mainIOS.mm:56
> +    // FIXME: Work-around for <rdar://problem/77922262>

I understand that Alexey requested a comment. And a comment is good. However, we do not need a FIXME. We can use exit() forever and need never go back to using return here. The comment can help us remember not to change the code back!