Repository navigation
runtime: add unit test suite for console identity and registry ConsoleMode mapping (RT-CONSOLE-IDENTITY-COVERAGE) - #2034
Open
abnalstlll-byte wants to merge 1 commit into
Conversation
…eMode mapping (RT-CONSOLE-IDENTITY-COVERAGE) Add standalone CPU-only unit test runtime/test/console_identity_test.cpp covering configured_device_type, console_mode_for, and cross-subsystem consistency across all device types and environment variable inputs. Register console_identity_test executable and CTest in runtime/CMakeLists.txt. AI-assisted (Claude Code)
Contributor
|
Verified on Windows 11 (
AI-assisted. |
Contributor
|
Verified by OreoFR
Note: shares AI-assisted (Claude Code, Claude Opus 5.5). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: RT-CONSOLE-IDENTITY-COVERAGE (claim)
What and why
runtime/shims/console_identity.his the single source of truth for console device type (configured_device_type()) and OEM registryConsoleModemapping (console_mode_for()), ensuringXSystemGetDeviceTypeand registry queriesHKLM\Software\Microsoft\Windows NT\CurrentVersion\OEM\ConsoleModenever disagree.Previously,
console_identity.hlacked a dedicated standalone unit test exercising all device type enums and environment variable boundary conditions.This adds
runtime/test/console_identity_test.cppverifying:console_mode_for:trueand correct DWORD values for Xbox Series consoles: Lockhart (0x60), Anaconda (0x64), Devkit (0x68).falsefor non-console / Xbox One types (Unknown, Pc, XboxOne, XboxOneS, XboxOneX, XboxOneXDevkit) and out-of-range values, leaving them to the host registry.configured_device_type:XboxScarlettAnaconda, 7) whenLEONIDA_DEVICE_TYPEis unset, empty, or outside 0..8.configured_device_type()andconsole_mode_for().Registers
console_identity_testand CTestconsole_identityinruntime/CMakeLists.txt.Tested
41/41 checks passed(0 failures).python -I tests/test_ci_registration.py: 16/16 pass.python -I tests/test_text_write_line_endings.py: 3/3 pass.python -I scripts/check_no_game_data.py: clean (0 violations, no game data).AI-assisted (Claude Code)