CNA-VGAP-011: No test exercises PlatformSelection.cmake's reserved-identifier and unknown-name refusal paths
Evidence basis: source-verified at the pinned commit. Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
PlatformSelection.cmake fails configure for SDL12, EMSCRIPTEN, WIN32 off Windows, TERMINAL on Windows and unknown names, but the only platform-selection configure test, CnaWaylandPlatformSelection, covers Wayland alone.
- Identifier
CNA-VGAP-011- Category
- Verification gap
- Subsystem
- Build & CI
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- None
- Affected contract
- cmake/PlatformSelection.cmake configure-time refusals for reserved and unknown CNA_PLATFORM values
Expected behaviour
PlatformSelection.cmake makes these refusals a deliberate contract: it says the reserved-name failure is “a hard error on purpose”, because “falling back to SDL3 would build something other than what you asked for.” A contract that regresses silently -- a reserved name that starts to fall through to SDL3 -- deserves a test, the way Wayland's selection does.
Actual behaviour at TARGET
The one selection test registered in cmake/UnitTests.cmake is CnaWaylandPlatformSelection (WaylandPlatformSelection.cmake), which checks only that CNA_PLATFORM=WAYLAND is offered where buildable, refused with a package name where not, and changes no default. No test configures CNA_PLATFORM=SDL12, EMSCRIPTEN, WIN32 on a non-Windows host, TERMINAL on Windows, or an unknown name and asserts the FATAL_ERROR. The Sdl2OnlyRendererGate, RendererDefaultCase and RendererRetiredIdentityCase tests cover renderer selection, not the four platform refusal branches.
Source locations
cmake/PlatformSelection.cmake— the four FATAL_ERROR refusal branches (reserved list, host-conditional, unknown name)cmake/UnitTests.cmake— CnaWaylandPlatformSelection is the only platform-selection configure testcmake/Tests/WaylandPlatformSelection.cmake— covers Wayland selection only
Evidence
Checked by reading PlatformSelection.cmake and every add_test in cmake/UnitTests.cmake and each fixture under cmake/Tests/ at 009d40f5. The Wayland selection fixture is the only one that drives platform selection; nothing drives the reserved or unknown branches. Not executed. The Development platforms overview page records the same: “No CMake test at this snapshot exercises the reserved-name path.”
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
CnaWaylandPlatformSelection (Wayland only), and the renderer-selection fixtures. None configures a reserved or unknown CNA_PLATFORM.
Regression test
A fixture like WaylandPlatformSelection.cmake that runs cmake against a tiny project including PlatformSelection.cmake with CNA_PLATFORM set to each reserved value, an unknown value, and a host-wrong value, asserting a non-zero exit and the message that names the reserved/available sets.
Blast radius
The guarantee that a reserved or misspelled CNA_PLATFORM fails loudly instead of falling back to SDL3 is unverified; a regression there would ship silently. The offered platforms themselves are exercised by the platform CI cells and the Wayland selection test.
Workaround
No workaround is known.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- User guide
- Platform Support: combination rules
- Maintainer workflow
- Change build configuration: selectors
- Tests and validation
- Test architecture: configuration tests
- Known issues
- Verification gap index