Skip to content
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

Rewrite cts_exe.py to handle match logic #2199

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

RossBrunton
Copy link
Contributor

@RossBrunton RossBrunton commented Oct 14, 2024

cts_exe.py has been rewritten to include the logic for handling .match files. Specifically, it will divide the test space into two halves; tests that are expected to pass, and those that are expected to fail.

For the tests expected to pass, it will run them all in the same gtest invocation with the assumption that it succeeds. For the tests expected to fail, they will each be ran with individual gtest invocations. This allows them to freely segfault or abort without hurting other tests.

In this commit, the match files are (mostly) unchanged, and the passing and failing tests should be the same. The match file is treated as a list of failing tests with a few tokens that are replaced:

  • {{NONDETERMINISTIC}} ignored, required for compatibility with the match checker.
  • {{OPT}} this test may or may not fail. It's still ran seperately, but doesn't report an error on failure.
  • {{.*}} replaced with *; converts "match" wildcard matches to "gtest" test name matches.
  • # and empty lines are ignored and treated as a comment.
  • {{Segmentation for compatibility, this will cause a failure in the "excepted success" execution to not count as an error. This matches the behaviour of the prior match test logic.

Some .match files have been fixed and empty ones have been removed.

@github-actions github-actions bot added the conformance Conformance test suite issues. label Oct 14, 2024
@RossBrunton RossBrunton force-pushed the ross/fulltest branch 12 times, most recently from 97756a8 to 49fdac0 Compare October 15, 2024 16:16
@RossBrunton RossBrunton changed the title [TESTING] Make CTS resistant to segfaults/aborts Rewrite cts_exe.py to handle match logic Oct 15, 2024
@RossBrunton RossBrunton marked this pull request as ready for review October 15, 2024 16:22
@RossBrunton RossBrunton requested review from a team as code owners October 15, 2024 16:22
Copy link
Contributor

@EwanC EwanC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

command-buffer match file changes look good

@RossBrunton
Copy link
Contributor Author

Added specific logic to handle ctest_parser.py, manually checked and it now reports the same results before and after this change.

cts_exe.py has been rewritten to include the logic for handling
.match files. Specifically, it will divide the test space into
two halves; tests that are expected to pass, and those that are
expected to fail.

For the tests expected to pass, it will run them all in the same
gtest invocation with the assumption that it succeeds. For the
tests expected to fail, they will each be ran with individual
gtest invocations. This allows them to freely segfault or abort
without hurting other tests.

In this commit, the match files are (mostly) unchanged, and the
passing and failing tests should be the same. The match file is
treated as a list of failing tests with a few tokens that are
replaced:
* `{{NONDETERMINISTIC}}` ignored, required for compatibility with the
  match checker.
* `{{OPT}}` this test may or may not fail. It's still ran seperately,
  but doesn't report an error on failure.
* `{{.*}}` replaced with `*`; converts "match" wildcard matches to
  "gtest" test name matches.
* `#` and empty lines are ignored and treated as a comment.
* `{{Segmentation` for compatibility, this will cause a failure in
  the "excepted success" execution to not count as an error. This
  matches the behaviour of the prior match test logic.

Some .match files have been fixed and empty ones have been removed.

If GTEST_OUTPUT is specified, we assume that we are being run in
ctest_parser.py and don't do anything fancy.
@RossBrunton
Copy link
Contributor Author

Doesn't affect intel/llvm, merging without associated commit.

@RossBrunton RossBrunton merged commit d68fc55 into oneapi-src:main Oct 17, 2024
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conformance Conformance test suite issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants