KhronosGroup / KhronosGroup/OpenCL-CTS
Tests write to error log without returning TEST_FAIL
- Dominant language
- C++
- Stars
- 232
- Forks
- 235
- Avg merge
- 8d 7h
- Merged PRs (30d)
- 18
Description
There are cases in which `log_error` is called to write error messages to the log without TEST_FAIL being returned by a test, where it would be appropriate for the test to do so.
For example:
* `convert_explicit_value` and `generate_random_data` in _test_common/harness/conversions.cpp_.
* `get_channel_order_channel_count`, `has_alpha`, `read_image_pixel_float` in _test_common/harness/imageHelpers.cpp_.
* `gen` functions in _test_conformance/subgroup/test\_subgroup\_*.cpp_.
Please note that this resulted in issue #1469 – it is not merely a hypothetical concern.
In cases where a test does not return any status at all where a function calls `log_error`, no consistent approach is taken. In some cases, `exit(-1)` is called. In others, `abort()` is called.
Note that `assert` may be not be dependable – the CTS's GitHub workflows only build with release configs (which disable assertions) and so care must be taken when testing the CTS to ensure that debug configurations are included in this testing.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing log_error callers in _test_common/harness/conversions.cpp, _test_common/harness/imageHelpers.cpp, and _test_conformance/subgroup/test_subgroup_*.cpp, noting whether each caller can return a test status. Compare the existing exit(-1), abort(), and TEST_FAIL paths, then check release and debug workflow configurations. Done means error paths consistently report test failure without relying on disabled assertions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100