-
Notifications
You must be signed in to change notification settings - Fork 837
Add meaningful matchers to death tests #17401
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
Conversation
Replace empty string matchers with descriptive patterns that document the expected failure: - operator_registry_test: "registration failed" - operator_impl_example_test: "Unhandled dtype" - scalar_type_util_test: "Unknown ScalarType" - memory_manager_test: "cannot be the same" - method_test: "[0-9]+ >= [0-9]+" - tensor_util_test: "stride of the.*dimension shall" - etdump_test: "before any events are added" - aten_bridge_test: "Strides don't match dim order" Also add et_pal_init() to ET_EXPECT_DEATH macro to initialize PAL in the forked subprocess. Authored with Claude.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17401
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 1 Unrelated FailureAs of commit 739d0a8 with merge base b4fc4d3 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| EXPECT_DEATH_IF_SUPPORTED(_statement, _matcher) | ||
| EXPECT_DEATH_IF_SUPPORTED( \ | ||
| { \ | ||
| et_pal_init(); \ |
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.
Looks like adding this broke the executor_pal_death_test that was testing to make sure other PAL functions failed if this hadn't been called.
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.
Added a EXPECT_DEATH_NO_PAL_INIT variation.
The ET_EXPECT_DEATH macro now calls et_pal_init() in the subprocess, which defeats the purpose of executor_pal_death_test that specifically tests behavior when PAL is NOT initialized. Add a variant that skips PAL initialization for this use case. Co-authored-by: Claude <noreply@anthropic.com>
Summary
Replace empty string matchers with descriptive patterns that document the expected failure:
Also add et_pal_init() to ET_EXPECT_DEATH macro to initialize PAL in the forked subprocess.
Authored with Claude.
Test plan