KhronosGroup / KhronosGroup/OpenCL-CTS

Generalise/generate the extension preprocessor macro tests

Open
#1,332 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
232
Forks
235
Avg merge
8d 7h
Merged PRs (30d)
18

Description

There is a test (https://github.com/KhronosGroup/OpenCL-CTS/blob/master/test_conformance/compiler/test_compiler_defines_for_extensions.cpp) that checks that for all supported extensions that modify the language (hard-coded in the CTS), a preprocessor macro with the name of the extension is defined by the compiler. There are a number of issues with this test:
- Its code is hard to read
- The list of supported extensions is hard-coded in the test source code which means this test needs to be updated each time we introduce a new KHR extension
- It doesn't cover EXT or vendor extensions.

We could instead annotate the spec XML to report each extension as modifying the language or not and generate the list automatically from the spec XML. This would make it easier to keep the list up-to-date, provide coverage for all extensions present in the spec XML and result in a single source of truth for that information (and make it reusable in other projects).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with test_conformance/compiler/test_compiler_defines_for_extensions.cpp and trace how the current hard-coded extension list is used. Then inspect the spec XML for extension metadata and the existing generation path, if any. Done means the list is generated from the XML and the test covers language-modifying KHR, EXT, and vendor extensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, xml
Domain
compilers, testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.