Skip to content

[SYCL][NFC] Fix skipping KernelBundleWith2Kernels test #5225

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

Merged
merged 1 commit into from
Dec 27, 2021

Conversation

bader
Copy link
Contributor

@bader bader commented Dec 27, 2021

Currently most of unit tests print something and just return if test
pre-requisites are not met. llvm-lit reports such tests as "passed"
instead of "skipped" because Google Test framework reports test status
incorrectly. GTEST_SKIP must be used to indicate the framework "skipped"
test status.

Fixed a typo in PiMock.hpp.

TODO: the same approach must be applied to all other unittests.

Currently most of unit tests print something and just return if test
pre-requisites are not met. llvm-lit reports such tests as "passed"
instead of "skipped" because Google Test framework reports test status
incorrectly. GTEST_SKIP must be used to indicate the framework "skipped"
test status.

Fixed a typo in PiMock.hpp.

TODO: the same approach must be applied to all other unittests.
@bader bader requested a review from a team as a code owner December 27, 2021 12:51
@bader bader requested a review from v-klochkov December 27, 2021 12:51
@bader
Copy link
Contributor Author

bader commented Dec 27, 2021

TODO: the same approach must be applied to all other unittests.

@intel/llvm-reviewers-runtime, I think we should rewrite unit-tests. They must be able to mock any device/platform and not skip the test based on default_selector behavior.
Thoughts?

Copy link
Contributor

@alexbatashev alexbatashev left a comment

Choose a reason for hiding this comment

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

The reason why that wasn’t done earlier is that LLVM used an outdated version of Google Test library, that didn’t support skipping tests. We should update all of our tests, indeed.

@alexbatashev
Copy link
Contributor

TODO: the same approach must be applied to all other unittests.

@intel/llvm-reviewers-runtime, I think we should rewrite unit-tests. They must be able to mock any device/platform and not skip the test based on default_selector behavior. Thoughts?

The problem with plugins is that they require external dependencies to be loaded properly. We need some sort of test plugin, that would assert when any of its APIs is called (or maybe simply set dispatch table entries to nullptr to get segfault). This plugin would not have any dependencies and would only be loaded when unit tests are run. Then we will no longer be able to write tests that rely on sycl::default_selector behavior.

@alexbatashev
Copy link
Contributor

According to this page, there's an incident on github side, which affected testing results.

@bader bader merged commit 623839f into intel:sycl Dec 27, 2021
@bader bader deleted the test-skip branch December 27, 2021 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants