OLD-10029: test(hw_oracle): unit tests for tools/hw_oracle/drm.py #1029

Open
github-bot wants to merge 1 commit from github-bot/gh-1029 into main AGit
Owner

@⁠klikso on GitHub · 2026-11-24 17:03 UTC · original
klikso:carry/old-10029-hw-oracle-drm-tests → main · +433 −0 · 1 files · 1 commits · open

Claimed in the coordination issue as: OLD-10029

What and why

Carries forward old-pr/10029 (draft #297) rebased onto current main:

  • Adds unit tests in tests/test_hw_oracle_drm.py for tools/hw_oracle/drm.py covering 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 passed
  • python -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: passed
  • python -m compileall -q make_game.py tools tests: clean

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed: n/a (no translator rule).
**@⁠klikso** on GitHub · 2026-11-24 17:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1029) `klikso:carry/old-10029-hw-oracle-drm-tests` → `main` · +433 −0 · 1 files · 1 commits · open Claimed in the coordination issue as: OLD-10029 ### What and why Carries forward `old-pr/10029` (draft #297) rebased onto current `main`: - Adds unit tests in `tests/test_hw_oracle_drm.py` for `tools/hw_oracle/drm.py` covering DRM device node discovery, render node enumeration, chip generation detection, and fallback paths. Original commit preserved: `Ritolino <230431388+[email protected]>`. ### Tested - `python -I tests/test_hw_oracle_drm.py`: 13/13 passed - `python -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`: passed - `python -m compileall -q make_game.py tools tests`: clean GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed: n/a (no translator rule).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:34:23 +00:00
Author
Owner

@⁠KernelSmoker on GitHub · 2026-11-24 17:07 UTC · original · approved these changes

Verified on exact head d612e596df62e5a4e5394b0550a8d1fd99ed177f (base fce586c6d6). tests/test_hw_oracle_drm.py passes 13/13; line-ending tests pass 3/3. The changed test file passes scripts/check_no_game_data.py and git 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/dri hardware access is claimed.

**@⁠KernelSmoker** on GitHub · 2026-11-24 17:07 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1029#pullrequestreview-6043869081) · **approved these changes** Verified on exact head d612e596df62e5a4e5394b0550a8d1fd99ed177f (base fce586c6d6f74160eccff015d9806e179188d862). `tests/test_hw_oracle_drm.py` passes 13/13; line-ending tests pass 3/3. The changed test file passes `scripts/check_no_game_data.py` and `git 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/dri` hardware access is claimed.
Author
Owner

@⁠klikso on GitHub · 2026-11-24 17:42 UTC · original

Note for reviewers: the head moved from d612e596d to 22ce0f40a. 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 on d612e596d.

**@⁠klikso** on GitHub · 2026-11-24 17:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1029#issuecomment-7139591573) Note for reviewers: the head moved from `d612e596d` to `22ce0f40a`. 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 on `d612e596d`.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1029/head:github-bot/gh-1029'
git switch 'github-bot/gh-1029'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1029'
git switch 'github-bot/gh-1029'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1029'
git switch 'github-bot/gh-1029'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1029'
git switch 'main'
git merge --squash 'github-bot/gh-1029'
git switch 'main'
git merge --ff-only 'github-bot/gh-1029'
git switch 'main'
git merge 'github-bot/gh-1029'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.