-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RNTester][IOS] Enable Address and Undefined Behavior Sanitizers #36443
Conversation
Base commit: 346de2d |
Hi @Saadnajmi, thank you for the PR. I'll have a more thorough look at it on Monday, but currently the |
Sure. I'll take a look in the next day or two. I think I reproed the same crash locally but wasn't sure if it was local or acutally because I enabled the new sanitizers. It'll be interesting to see if we can make that test better now :) |
For reference, the error I'm seeing locally is as follows:
This seems to be similar to https://github.com/google/sanitizers/wiki/AddressSanitizerOneDefinitionRuleViolation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, thank you for spending time in fixing the tests! :D
Let's see if the internal infra is happy about these changes! 😅
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff @Saadnajmi 👍
@cipolleschi merged this pull request in 65e61f3. |
Summary: This change does two things: 1) Moves RNTester on iOS to use an `.xctestplan` to configure its tests. This moves the test configuration out of the `.xcscheme` file, and into a new json file that Xcode likes. It also allows you to run the same tests multiple times with different configurations. This was done by clicking the focused button below.  Note: this is partially me upstreaming a change from React Native macOS (microsoft#190), though at some point our Xcode project got messed up and we were no longer referencing them ��. 2) Enables Address Sanitizer and Udefined Behavior Sanitizer through the xctestplan This should help catch some extra vulnerabilities should they ever show up while our tests run. Notably, I did not _also_ add a configuration to run Thread Sanitizer, because tests start failing with that enabled 😅. ## Changelog: [IOS] [SECURITY] - Enable Address and Undefined Behavior Sanitizers on RNTester Pull Request resolved: facebook#36443 Test Plan: CI should pass Reviewed By: cortinico Differential Revision: D44213517 Pulled By: cipolleschi fbshipit-source-id: 0646174c4b416413a563e8178aa2cfca230b5e66
Summary: This change does two things: 1) Moves RNTester on iOS to use an `.xctestplan` to configure its tests. This moves the test configuration out of the `.xcscheme` file, and into a new json file that Xcode likes. It also allows you to run the same tests multiple times with different configurations. This was done by clicking the focused button below.  Note: this is partially me upstreaming a change from React Native macOS (microsoft#190), though at some point our Xcode project got messed up and we were no longer referencing them ��. 2) Enables Address Sanitizer and Udefined Behavior Sanitizer through the xctestplan This should help catch some extra vulnerabilities should they ever show up while our tests run. Notably, I did not _also_ add a configuration to run Thread Sanitizer, because tests start failing with that enabled 😅. ## Changelog: [IOS] [SECURITY] - Enable Address and Undefined Behavior Sanitizers on RNTester Pull Request resolved: facebook#36443 Test Plan: CI should pass Reviewed By: cortinico Differential Revision: D44213517 Pulled By: cipolleschi fbshipit-source-id: 0646174c4b416413a563e8178aa2cfca230b5e66
… tests (#44642) Summary: On React Native macOS (I am not sure with the current state of React Native), the Xcode Unit and Integration tests are a bit flaky. Rather than set "retry on failure up to 3 times" through the pipeline config (in our case, Azure Pipelines), I realized my earlier PR to use Xcode test plans (#36443) means we can have Xcode retry the test. This should be faster than retrying it on the pipeline, because it retries just the failing test, not the entire "test" step. I did this on React Native macOS, so I'm doing it upstream so we can remove a diff. ## Changelog: [INTERNAL] [CHANGED] - Set `retryOnFailure` for Xcode Unit and Integration tests Pull Request resolved: #44642 Test Plan: CI should pass (faster) Reviewed By: cortinico Differential Revision: D57662523 Pulled By: cipolleschi fbshipit-source-id: 8de2ab0ea15ba4d38c3b5bf96108c0c7ff5e9f32
… tests (facebook#44642) Summary: On React Native macOS (I am not sure with the current state of React Native), the Xcode Unit and Integration tests are a bit flaky. Rather than set "retry on failure up to 3 times" through the pipeline config (in our case, Azure Pipelines), I realized my earlier PR to use Xcode test plans (facebook#36443) means we can have Xcode retry the test. This should be faster than retrying it on the pipeline, because it retries just the failing test, not the entire "test" step. I did this on React Native macOS, so I'm doing it upstream so we can remove a diff. ## Changelog: [INTERNAL] [CHANGED] - Set `retryOnFailure` for Xcode Unit and Integration tests Pull Request resolved: facebook#44642 Test Plan: CI should pass (faster) Reviewed By: cortinico Differential Revision: D57662523 Pulled By: cipolleschi fbshipit-source-id: 8de2ab0ea15ba4d38c3b5bf96108c0c7ff5e9f32
Summary
This change does two things:
.xctestplan
to configure its tests. This moves the test configuration out of the.xcscheme
file, and into a new json file that Xcode likes. It also allows you to run the same tests multiple times with different configurations. This was done by clicking the focused button below.Note: this is partially me upstreaming a change from React Native macOS (microsoft#190), though at some point our Xcode project got messed up and we were no longer referencing them 🤷🏾.
This should help catch some extra vulnerabilities should they ever show up while our tests run.
Notably, I did not also add a configuration to run Thread Sanitizer, because tests start failing with that enabled 😅.
Changelog
[IOS] [SECURITY] - Enable Address and Undefined Behavior Sanitizers on RNTester
Test Plan
CI should pass