From 47dbc782aececa3cab37714b7a450af08482b9d1 Mon Sep 17 00:00:00 2001 From: Kelbo Date: Mon, 30 Nov 2026 07:45:54 -0500 Subject: [PATCH] tests: accept the clear censuses in the memory SRV report #3482 added the direct-draw and clear censuses to the same report block, so it is six lines where startup_memory_srv_diag_check expected four. The check failed on both backends and main is red at 077bff3ac. Validate the four lines the check is about, in order, and require any remaining line to be one of those censuses by prefix, so the block is still constrained rather than accepted whole. --- tests/startup_memory_srv_diag_check.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/startup_memory_srv_diag_check.py b/tests/startup_memory_srv_diag_check.py index 3ebacd9c2f..2a3f820a56 100644 --- a/tests/startup_memory_srv_diag_check.py +++ b/tests/startup_memory_srv_diag_check.py @@ -33,6 +33,8 @@ r"mips=10 layout=0x0 flags=0x0 calls=1") TOKENS = r"x2w-draw token texture nulls: total 1 in 1 pipelines; ([0-9a-f]{16})=1 other=0" WRITES = r"x2w-d3d12 memory SRV writes \(slot 70\): calls 1, distinct entries 1 \(untracked 0\)" +# The direct-draw and clear censuses that share the report (#3482); only their prefix is fixed here. +CLEAR_CENSUS = r"x2w-render clear (census|rtv)[: ].*" WRITTEN = (r"x2w-d3d12 memory SRV written 1: dest=0x[0-9a-f]+ address=0x[0-9a-f]+ " r"res\{dim=3 fmt=61 size=2x2x1 mips=1 layout=0x0 flags=0x0 align=0 samples=1/0\} " r"view\{dim=4 fmt=61 map=0x1688 mostmip=0 mips=1 plane=0 clamp=0\}") @@ -72,8 +74,8 @@ def check(directory, consumer, backend, control=False): raise AssertionError(f"column 1 row {y}: {right.hex()}, expected the R8 texel") lines = census_block(result.stdout) - if len(lines) != 4: - raise AssertionError("census report is not four lines:\n" + "\n".join(lines)) + if len(lines) < 4: + raise AssertionError("census report has fewer than four lines:\n" + "\n".join(lines)) if not re.fullmatch(REFUSALS, lines[0]): raise AssertionError(f"refusal counts\n line {lines[0]}\n expected {REFUSALS}") if not re.fullmatch(SHAPE, lines[1]): @@ -83,6 +85,11 @@ def check(directory, consumer, backend, control=False): raise AssertionError(f"token nulls\n line {lines[2]}\n expected {TOKENS}") if not re.fullmatch(WRITES, lines[3]): raise AssertionError(f"slot 70 writes\n line {lines[3]}\n expected {WRITES}") + # The report also carries the direct-draw and clear censuses (#3482); they are not this check's + # subject, but nothing else may appear in the block. + for line in lines[4:]: + if not re.fullmatch(CLEAR_CENSUS, line): + raise AssertionError(f"unexpected census line\n line {line}\n expected {CLEAR_CENSUS}") log = trap_log.read_text(errors="replace").splitlines() slot70 = [line for line in log if "Device::slot70" in line]