Skip to content

test_dmsh_abi's ratchet no longer counts "?": the unknown binding kind is also what log lines write for a name they do not have, and the third such placeholder in nvn_mtl.m fails the Tool tests on main (issue #1656) - #1981

Closed
Atomsk-debug wants to merge 1 commit into
seedds:mainfrom
Atomsk-debug:abi-ratchet-placeholder

Conversation

@Atomsk-debug

Copy link
Copy Markdown
Contributor

What and why

The Tool tests job fails on main, and so on every pull request, in dm/tools/tests/test_dmsh_abi.py:

FAIL: test_no_new_abi_literals
AssertionError: {'dm/gfx/nvn/nvn_mtl.m': {"'?'": '2 -> 3'}} != {}

The ratchet counts the ABI's kind names and distinctive numbers written as literals in the files that use the header, so that they do not come back in place of the DMSH_* names. The unknown kind is "?", and nvn_mtl.m also writes "?" in log lines for a shader key, a module name or a pipeline description it does not have: two such placeholders were in the baseline, and the third (70b9a68, the pipeline archive index, @"?" in akb_s) tripped it.

"?" is not distinctive enough to find as a literal, as 8, 16, 0x20 and 128 are not among the numbers: the ratchet now leaves the unknown kind out and the baseline no longer lists it. The other kinds and the numbers are counted as before. Part of #1656 (the Tool tests item; today's main has the other two items of that issue elsewhere: t_gfx_suspend links, and the iOS build's IOBluetooth link is #1899 / #1906).

Checked

  • Tests: python3 -m unittest dm/tools/tests/test_dmsh_abi.py fails on main (7974118) and passes with the change (10 tests). Every other tool, iOS and gfx test file of the CI loop passes locally on main (172 files).
  • Devices and OS: MacBook M4, macOS 27.0, Python 3.14.

Docs

  • No game files, keys or data extracted from a game in the change or the attachments

🤖 Generated with Claude Code

…d is also what log lines write for a name they do not have, and the third such placeholder in nvn_mtl.m failed the Tool tests on main (issue seedds#1656)

The ratchet counts the ABI's kind names and distinctive numbers written as literals in the
files that use the header, so that they do not come back in place of the DMSH_* names. The
unknown kind is "?", and nvn_mtl.m also writes "?" in log lines for a shader key, a module
name or a pipeline description it does not have: two such placeholders were in the baseline,
and the third (70b9a68, the pipeline archive index) made test_no_new_abi_literals fail on
main, {'dm/gfx/nvn/nvn_mtl.m': {"'?'": '2 -> 3'}}, and with it the Tool tests job of every
pull request.

"?" is not distinctive enough to find as a literal, as 8, 16, 0x20 and 128 are not among
the numbers: the ratchet now leaves the unknown kind out and the baseline no longer lists
it. The other kinds and the numbers are counted as before.

Checked: test_dmsh_abi (10 tests) fails on main and passes with the change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Atomsk-debug

Copy link
Copy Markdown
Contributor Author

Closing: main's 80fc2ec covers this.

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

Labels

tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant