OLD-10029: test(hw_oracle): unit tests for tools/hw_oracle/drm.py #1029
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1029"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by klikso on 2026-11-24T17:03:06Z.
Claimed in the coordination issue as: OLD-10029
What and why
Carries forward
old-pr/10029(draft #297) rebased onto currentmain:tests/test_hw_oracle_drm.pyfortools/hw_oracle/drm.pycovering DRM device node discovery, render node enumeration, chip generation detection, and fallback paths.Original commit preserved:
Ritolino <[email protected]>.Tested
python -I tests/test_hw_oracle_drm.py: 13/13 passedpython -I scripts/check_no_game_data.py tests/test_hw_oracle_drm.py: passed (no game data)python -I tests/test_text_write_line_endings.py: passedpython -m compileall -q make_game.py tools tests: cleanGPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed: n/a (no translator rule).Imported from ubiquitarianism/leonida. Originally posted by KernelSmoker on 2026-11-24T17:07:52Z.
Review: APPROVED
Verified on exact head d612e596df62e5a4e5394b0550a8d1fd99ed177f (base
fce586c6d6).tests/test_hw_oracle_drm.pypasses 13/13; line-ending tests pass 3/3. The changed test file passesscripts/check_no_game_data.pyandgit diff --check. The cases exercise discovery, generation parsing, fallback behavior, ELF/kernel-register decoding, launcher construction/cache, and failure reporting through synthetic files and mocked system calls. No GPU or/dev/drihardware access is claimed.Imported from ubiquitarianism/leonida. Originally posted by klikso on 2026-11-24T17:42:37Z.
Note for reviewers: the head moved from
d612e596dto22ce0f40a. Only the commit's committer field changed (to a GitHub noreply address); the tree, the author and the message are identical, and the base is the same. The approval above was given ond612e596d.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-27T23:45:07Z.
Hi @klikso, thanks for these tests. I merged this pull request onto current
mainlocally and ran them: they pass, and they also pass on plainmain. The "Is it mergeable?" list in CONTRIBUTING.md asks for "A new test that fails onmainand passes with the pull request", so as it stands this one doesn't show a bug thatmainstill has. If one of these cases did fail before a fix that has since landed, could you say which commit, or add a case that still fails onmain? If the tests are meant to lock in behaviourmainalready has, please say so in the description and a maintainer can decide.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T11:26:18Z.
#1029 | head
22ce0f40ab6046c0519b8c50cc13b5b755374378|python3 -I tests/test_hw_oracle_drm.py -v| red: 13 passed | green: 13 passed | Passed on both treesThe file tests DRM discovery, launch formatting and error handling with fixtures/mocks. All 13 passed on the existing implementation.
Copied the PR tests onto clean main
4a54aedcb6b66525e0c9f72a6ea10263337c9141for the baseline, then merged that main into the recorded PR head and reran those files. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Unittest failure/error counts include subtests where applicable. AI-assisted with OpenAI Codex. Batch claim.Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T11:41:53Z.
Merged, thank you @klikso! This PR (OLD-10029: test(hw_oracle): unit tests for tools/hw_oracle/drm.py) passed its own tests with main merged in during sodove's verification of this shader batch, so it went in with the batch.
AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.