[PR #721] [MERGED] test_shader_checks: count and fake cs_w32_shift64 (six tests red on main since #590) #761

Closed
opened 2026-11-26 20:18:57 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/721
Author: @Boost9898
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: fix/shader-checks-shift64


📝 Commits (1)

  • bb83b57 tests: count and fake cs_w32_shift64 in test_shader_checks

📊 Changes

1 file changed (+11 additions, -2 deletions)

View changed files

📝 tests/test_shader_checks.py (+11 -2)

📄 Description

Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7132029799

What and why

#590 (49d904fef) added cs_w32_shift64 to main() in runtime/test/shaders/check.py: a dump whose input records are seeded through VKC_HEAP_INIT. tests/test_shader_checks.py was not updated, so six Wave64Checks tests fail on main 51f316092:

  • TOTAL doesn't count the new case, so the expected N of TOTAL pass line is one short (215 of 219 vs 215 of 220).
  • The fake harness has no answer for cs_w32_shift64, so it falls through to the default branch, writes no dump, and the case fails with no VKC_DUMP file written.

This counts the case in TOTAL and teaches the fake harness to answer it like cs_heap_init. It checks the 1 dump arguments and VKC_OUT_WORDS, then returns check.shift64_words()'s expected words only when the VKC_HEAP_INIT file holds the seeded input records. Otherwise it echoes the input back, so a check.py that stops seeding the inputs still fails.

Tested

Apple M4, macOS 26.5.1, Python 3.14.8 and 3.12.10, CPU only, no game files.

  • tests/test_shader_checks.py: 14 failures on main 51f316092. With this change, 87 OK on both versions.
  • tests/test_gpu_shift64.py: OK on both versions.
  • Negative control: changing one seeded input word in check.shift64_test makes the 14 failures come back.
  • python -m compileall, git diff --check and scripts/check_no_game_data.py on the changed file: clean.

GPUs tested: n/a (no GPU tests involved)

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 changes)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/721 **Author:** [@Boost9898](https://github.com/Boost9898) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `fix/shader-checks-shift64` --- ### 📝 Commits (1) - [`bb83b57`](https://github.com/ubiquitarianism/leonida/commit/bb83b572e8c5ec47bbeb3bda0de0836cc26da980) tests: count and fake cs_w32_shift64 in test_shader_checks ### 📊 Changes **1 file changed** (+11 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_shader_checks.py` (+11 -2) </details> ### 📄 Description Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7132029799 ### What and why #590 (`49d904fef`) added `cs_w32_shift64` to `main()` in `runtime/test/shaders/check.py`: a dump whose input records are seeded through `VKC_HEAP_INIT`. `tests/test_shader_checks.py` was not updated, so six `Wave64Checks` tests fail on `main` `51f316092`: - `TOTAL` doesn't count the new case, so the expected `N of TOTAL pass` line is one short (`215 of 219` vs `215 of 220`). - The fake harness has no answer for `cs_w32_shift64`, so it falls through to the default branch, writes no dump, and the case fails with `no VKC_DUMP file written`. This counts the case in `TOTAL` and teaches the fake harness to answer it like `cs_heap_init`. It checks the `1 dump` arguments and `VKC_OUT_WORDS`, then returns `check.shift64_words()`'s expected words only when the `VKC_HEAP_INIT` file holds the seeded input records. Otherwise it echoes the input back, so a `check.py` that stops seeding the inputs still fails. ### Tested Apple M4, macOS 26.5.1, Python 3.14.8 and 3.12.10, CPU only, no game files. - `tests/test_shader_checks.py`: 14 failures on `main` `51f316092`. With this change, 87 OK on both versions. - `tests/test_gpu_shift64.py`: OK on both versions. - Negative control: changing one seeded input word in `check.shift64_test` makes the 14 failures come back. - `python -m compileall`, `git diff --check` and `scripts/check_no_game_data.py` on the changed file: clean. GPUs tested: n/a (no GPU tests involved) 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. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator rule changes) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:57 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#761
No description provided.