chain_check: pin an unknown interface, a non-builtin exception and the slot-57 line

The trace test now feeds PS_Secret::Slot12 and expects one more "(other)";
the reasons test feeds "translator error SecretError" and expects
"translator error #"; the runtime pins add the slot-57 failure fprintf
of d3d12_xs_device.cpp. dev-tools.md says which trace names and digest
endings are printed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MoonEyes
2026-11-26 11:40:26 +01:00
parent 044e27122f
commit a6ec8f38a1
2 changed files with 11 additions and 5 deletions

View File

@ -85,7 +85,9 @@ The last line names the weakest link: the first block, in chain order, with the
A family is FAIL when more than 1% of its programs have no module. An llvm-mc older than 23 is a WARN (#1923). The
`--help` text lists every threshold. The report prints counts and fixed words only: no program names, no log lines
and no paths. A refusal reason is printed only when it matches a message from `tools/rdna2spirv.py`; any other
reason is counted as `other`. Add `--show-paths` to name the folder and the log, but not in a report you publish.
reason is counted as `other`. A D3D12 method name is printed only when the runtime's sources contain it, and the
end of a boot digest only in the forms boot.ps1 writes. Add `--show-paths` to name the folder and the log, but not
in a report you publish.
The exit code is `0` whatever the verdicts. With `--strict` it is `1` when a block is FAIL, and bad arguments exit
`2`. Probing asks llvm-mc, spirv-val and git for their versions; `--no-probe` runs nothing.

View File

@ -226,10 +226,11 @@ class ChainCheckTest(unittest.TestCase):
log = runtime_log(os.path.join(self.root, "run.log"), extra=(
"[d3d12-trace] #9 PS_Secret_deadbeef failed",
f"[d3d12-trace] #10 {SECRET}::Create failed",
"[d3d12-trace] #11 XboxID3D12Fence::Slot12 failed"))
"[d3d12-trace] #11 XboxID3D12Fence::Slot12 failed",
"[d3d12-trace] #12 PS_Secret::Slot12 failed"))
write(os.path.join(self.root, "run.digest.txt"), f"== boot run: {SECRET} ran its full time limit\n")
rt = block(chain_check.check(work, log, probe=False), "runtime")
self.assertEqual(rt["d3d12_problems"], {"(other) failed": 2, "ID3D12Device2::CreatePipelineState failed": 1,
self.assertEqual(rt["d3d12_problems"], {"(other) failed": 3, "ID3D12Device2::CreatePipelineState failed": 1,
"XboxID3D12Fence::Slot12 failed": 1})
self.assertEqual(rt["ending"], "other")
for ending, code in (("ran its full time limit (783 s), stopped", 0),
@ -283,7 +284,8 @@ class ChainCheckTest(unittest.TestCase):
# Every runtime line the report counts, pinned to the source that prints it: a reworded message would make
# its count fall to 0 and the runtime block pass in silence.
pins = {
"runtime/shims/d3d12_xs_device.cpp": ["[rt] d3d12_xs: slot 67 call %llu failed with 0x%08lx"],
"runtime/shims/d3d12_xs_device.cpp": ["[rt] d3d12_xs: slot 67 call %llu failed with 0x%08lx",
"[rt] d3d12_xs: slot 57 call %llu failed with 0x%08lx"],
"runtime/shims/d3d12_vulkan_device.cpp": [
"[rt] d3d12: %zu translated shaders (%zu fspx, %zu fspx_compute, ",
"%zu fspx_gfx, %zu bvh, %zu exe) from %s",
@ -342,10 +344,12 @@ class ChainCheckTest(unittest.TestCase):
f"2 {SECRET} source\n"
f"1 E:\\work\\{SECRET}.s\n"
"1 translator error KeyError\n"
"1 translator error SecretError\n"
"1 secret_program_name\n")
lib = block(chain_check.check(work, probe=False), "library")
self.assertEqual(dict((r, n) for n, r in lib["reasons"]),
{"s_sethalt": 2, "# source": 2, "other": 2, "translator error KeyError": 1})
{"s_sethalt": 2, "# source": 2, "other": 2, "translator error KeyError": 1,
"translator error #": 1})
def test_empty_and_partial_folders_are_na(self):
empty = os.path.join(self.root, "empty")