CNA-VGAP-011: No test exercises PlatformSelection.cmake's reserved-identifier refusal paths
Evidence basis: source-verified at the pinned commit. Claims on this page were checked by reading the CNA source at commit c1c316b9; 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 and TERMINAL on Windows, but no test asserts those refusals; the one platform-selection test, CnaPlatformSelection_Retired, covers only the retired and unknown names.
- Identifier
CNA-VGAP-011- Category
- Verification gap
- Subsystem
- Build & CI
- Status
- Narrowed (partially fixed; describes only what survives)
- Verified against
- CNA
c1c316b9(c1c316b9c7a846ce8002809c151fcd1af14942c9) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- None
- Affected contract
- cmake/PlatformSelection.cmake configure-time refusals for reserved 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 the retired names now have one.
Actual behaviour at TARGET
The only platform-selection test registered in cmake/UnitTests.cmake is CnaPlatformSelection_Retired (RetiredPlatformSelection.cmake). It runs the selection file in script mode with WIN32 set to false and to true and asserts the refusal of every former selector: SDL2 as an unknown name, and the former direct window-system values as removed values that point to -DCNA_PLATFORM=SDL3. No test runs CNA_PLATFORM=SDL12, EMSCRIPTEN or TERMINAL on Windows and asserts the reserved-identifier FATAL_ERROR. The RendererDefaultCase and RendererRetiredIdentityCase tests cover renderer selection, not the reserved-identifier platform branch.
Source locations
cmake/PlatformSelection.cmake— the FATAL_ERROR refusal branches: retired list, reserved list (TERMINAL reserved on Windows), unknown namecmake/UnitTests.cmake— CnaPlatformSelection_Retired is the only platform-selection configure testcmake/Tests/RetiredPlatformSelection.cmake— covers the retired values and the unknown-name refusal only
Evidence
Checked by reading PlatformSelection.cmake and every add_test in cmake/UnitTests.cmake and each fixture under cmake/Tests/ at c1c316b9. Not executed.
Narrowed at c1c316b9: 39e84add7 (PLAT-142) replaced the earlier SDL2-only fixture with CnaPlatformSelection_Retired, which drives the retired-value and unknown-name branches on a simulated Windows and non-Windows host, so the refusal of a Windows-only value off Windows that this entry listed is now covered (that value is retired everywhere). Nothing drives the reserved-identifier branch.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
CnaPlatformSelection_Retired (the retired and unknown names) and the renderer-selection fixtures. None runs a reserved CNA_PLATFORM.
Regression test
A fixture like RetiredPlatformSelection.cmake that runs the selection file in script mode with CNA_PLATFORM set to each reserved value (and TERMINAL with WIN32 true), asserting a non-zero exit and the message that names the reserved and available sets.
Blast radius
The guarantee that a reserved 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.
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