CNA-VGAP-037: CNA::Devices extension tests use canned platforms or check only that the host call does not fail, and exist only in a CNA_DEVICES=ON build
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). 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.
Camera, FileDialog, MessageBox and SystemTray tests drive canned platform services; the Clipboard, DisplayInfo, Locale, PowerInfo, SystemInfo and UrlLauncher tests call the host but mostly assert only that nothing crashes; every body is wrapped in #ifdef CNA_DEVICES (default OFF), so only the devices workflow's ON build runs them.
- Identifier
CNA-VGAP-037- Category
- Verification gap
- Subsystem
- Testing & evidence
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- CNA::Devices (Camera, Clipboard, DisplayInfo, FileDialog, Locale, MessageBox, PowerInfo, SystemInfo, SystemTray, UrlLauncher)
Expected behaviour
Each host-integration service has at least one test that fails when the real platform service misbehaves.
Actual behaviour at TARGET
CMakeLists.txt declares CNA_DEVICES OFF by default; the CNA::Devices sources and the test files under modules/devices-ext/tests (for example PowerInfoTests.cpp) are wrapped in #ifdef CNA_DEVICES, so a default build compiles empty translation units, by design because the layer is opt-in, and devices-tests.yml builds the devices-ubsan preset with it ON. With the option on, CameraTests, FileDialogTest, MessageBoxTest and SystemTrayTests use canned platforms, which prove the wrappers' forwarding rather than SDL3 behaviour (CNA-VGAP-007). ClipboardTests, LocaleTests, PowerInfoTests and UrlLauncherTests call the host's real service but accept any outcome: does-not-crash, a valid enum, or a read-back checked only when the set succeeded; SystemInfoTests asserts positive core and RAM counts, and one DisplayInfo case creates a real hidden window. The workflow's hand-written suite filter also never selects the FileDialog and MessageBox suites (CNA-BUG-035).
Source locations
CMakeLists.txt— option CNA_DEVICES, default OFFmodules/devices-ext/tests/CNA/Devices/PowerInfoTests.cpp— #ifdef CNA_DEVICES around the whole file.github/workflows/devices-tests.yml— the workflow that enables CNA_DEVICES
Evidence
Checked by reading at 009d40f5; not executed. Overlaps CNA-VGAP-007 (the SDL3 camera, tray and dialog-result paths), which is the platform half of the same gap.
Independent re-verification: Checked by reading at 009d40f5; not executed. Overlaps CNA-VGAP-007 (the SDL3 camera, tray and dialog-result paths), which is the platform half of the same gap.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
Canned-platform tests for each class when CNA_DEVICES=ON.
Regression test
A real-platform smoke test per service under Xvfb/SDL dummy drivers where possible, and a configure-time notice when the tests are compiled out.
Blast radius
Evidence only.
Workaround
No workaround is known.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Internals
- Device extensions: boundary
- Deep dives
- Host devices: evidence
- Known issues
- Verification gap index