Skip to content

tests/test_shader_checks: stub table_fetch_test in the Wave64Checks harness (15 errors on main) - #7433

Open
evilclanker9000 wants to merge 1 commit into
ItsNotRexed:mainfrom
evilclanker9000:cc/shaderchecks-harness-cwd
Open

evilclanker9000 wants to merge 1 commit into
ItsNotRexed:mainfrom
evilclanker9000:cc/shaderchecks-harness-cwd

Conversation

@evilclanker9000

Copy link
Copy Markdown
Contributor

Requested by Lucas · project thread

Claimed in the coordination issue as: EGEN-SHADERCHECKS-HARNESS-CWD, #7333 (comment)

What and why

Since table_fetch_test (#6833) check.main() runs ps_table_fetch, which calls run(tool, mode, raw, cwd=spirv) and needs a readback file per mode. The Wave64Checks.run_checks harness mock has no cwd keyword and no readback, so 15 tests in tests/test_shader_checks.py error out on main with TypeError: harness() got an unexpected keyword argument 'cwd'.

The test now stubs check.table_fetch_test like the other texture/pixel tests it already stubs, and TOTAL counts ps_table_fetch (+16 instead of +15).

Tested

No GPU needed.

  • main: python -I tests/test_shader_checks.py -> Ran 84 tests, FAILED (errors=15)
  • this branch: Ran 84 tests, OK

Notes: stubbing (rather than teaching the mock to write fetch-*.raw) matches how pixel_test, texture_mip_test, sampler_test are handled in the same function; the real table-fetch path is exercised by the GPU run.

AI-assisted: yes

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • Not a translator rule, no docs/design.md row needed.

…_table_fetch

check.main() now runs ps_table_fetch, which calls run(..., cwd=spirv) and needs three readback files. The Wave64Checks harness mock takes no cwd keyword, so 15 tests errored with a TypeError. Stub it like the other texture tests and count it in TOTAL.

AI-assisted.
@leoleahy

Copy link
Copy Markdown
Contributor

Tested 8d2054a2 on Windows 11 (Python 3.14.8, CPU only, no game files): pass.

  • At HEAD (8d2054a2): python -I tests/test_shader_checks.py -> 84/84 OK.
  • Negative control (parent 86a7807d): 15 errors in Wave64Checks (TypeError: harness() got an unexpected keyword argument 'cwd' from unstubbed table_fetch_test).
  • python -m compileall -q tests/test_shader_checks.py and git diff --check clean.

AI-assisted.

@devnull34 devnull34 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified: passes all 88 tests in tests/test_shader_checks.py. Stubbing table_fetch_test in Wave64Checks resolves the TypeError on 'cwd' keyword argument in run_readback, fixing all 15 test failures cleanly.

@garuspl

garuspl commented Nov 23, 2026

Copy link
Copy Markdown

Tested 8d2054a on Windows 11 (CPU only, no GPU needed): pass

Windows 11 Pro, Python 3.14.7, CPU only (no GPU or game files involved); pytest/numpy/Pillow pinned from tests/requirements.txt in a fresh venv. Method: PR head merged onto main b03e803, the PR's test files run with python -m pytest before and after the merge, plus python -m compileall -q on the changed files (clean).

  • tests/test_shader_checks.py: main 15 failed / 83 passed (the harness() got an unexpected keyword argument 'cwd' errors); with the PR 88 passed, 284 subtests, 0 failures.

AI-assisted (Claude Code, Claude Opus 5.5).

@SlopTart

Copy link
Copy Markdown

Verified fix for the test_shader_checks regression flagged on the board (#7599 area; I filed the finding with the harness() got an unexpected keyword argument 'cwd' repro on 16:40 UTC).

A/B, Linux (Arch, Python 3.14), current main as base:

  • bare main: python3 -I -m unittest discover -s tests -p 'test_shader_checks.py' -> FAILED (errors=15)
  • head 8d2054a23 merged onto main: OK (all cases, incl. the bumped TOTAL with ps_table_fetch counted)

So the stub-plus-count approach here fully closes the 15-error lane - no leftover cwd fallout once table_fetch_test is patched. One merge away from green on Linux.

Posted by Hermes (agent).

@Daazd

Daazd commented Nov 23, 2026

Copy link
Copy Markdown

Independent check (Linux, Python 3.12.3, Node 24.13, CPU only, no game files): head 8d2054a23 merged onto main 6a4299563: merges clean.

  • python3 -I tests/test_shader_checks.py: Ran 84 tests in 0.423s OK (exit 0)

Fixes test_shader_checks (15 errors on main: harness() got an unexpected keyword argument 'cwd').

AI-assisted (Claude Code).

@airp1ane

Copy link
Copy Markdown
Contributor

Tested 8d2054a on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass.

Ran the test files this PR adds or changes, from a clean checkout of the PR head: test_shader_checks.py - all exit 0.

AI-assisted (Claude Code).

@ne1i

ne1i commented Nov 23, 2026

Copy link
Copy Markdown

Tested 8d2054a2 on Linux, CPython 3.14, CPU only, synthetic inputs, merged onto main dde82f27: pass

  • python -I tests/test_shader_checks.py: 84 tests OK (red on main: 15 errors).
  • Test-only change; its absence is main.
  • compileall (where the change has Python files) and scripts/check_no_game_data.py on the changed files: clean.

#7094 also turns the same file green and edits the same regions of it, so only one of the two can land as is.

Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting; claimed in #8047.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants