Repository navigation
fix(test): make the Metal self-tests build on MSVC, pass on macOS and fit the sanitizer job - #1925
Merged
Merged
Conversation
… fit the sanitizer job (#1925) * fix(test): make the Metal self-tests build on MSVC, pass on macOS and fit the sanitizer job #1918 put the Metal parity tests on every host as self-tests, and three hosted jobs failed on them. MSVC: test_metal_integer_motion_parity.c and test_metal_motion_v2_parity.c named a scenario SC_DEFAULT, which winuser.h defines as 0xF160; the pthread shim includes windows.h, so the definition read `static const Scenario 0xF160 = {` (C2059). The scenarios are SC_DEFAULTS. A MinGW `-fsyntax-only -include windows.h` check reproduces the error on the old files and is clean on every test_metal_*_parity.c now. macOS: test_metal_selftest_integer_psnr died with SIGSEGV in expect_aggregate() on the hosted runner (release build with LTO), in the path that wrote the context's JSON output to a mkstemp() file and read apsnr_* back. The test passes on Linux under ASan and UBSan, so the fault inside that path was not isolated here. The test now reads the aggregate from the context's feature collector (vmaf_feature_collector_get() of libvmaf_priv.h and vmaf_feature_collector_get_aggregate()), the double the writer prints, with no file, temporary directory or windows.h. Sanitizers: the job failed on test_float_moment_sum (ADR-1497) reaching its 120 s timeout under the debug ASan + UBSan build on the hosted runner, twice. It takes 35 s on a workstation in that configuration; the timeout is 600 s. The job's own invocation, run here, enumerates 293 tests and passes every Metal self-test.
17 of 18 tasks
lusoris
force-pushed
the
fix/metal-selftests-ci
branch
from
October 3, 2026 15:09
df55def to
9cf0842
Compare
lusoris
added a commit
that referenced
this pull request
Oct 3, 2026
…st_float_moment_sum The hosted ASan + UBSan job killed test_metal_float_moment_sum at 120 s, as it killed test_float_moment_sum before #1925. Both run the same past-2^53 frames and take 35 s on a workstation under that build; the Metal mirror now has the same 600 s timeout.
lusoris
added a commit
that referenced
this pull request
Oct 3, 2026
…st_float_moment_sum The hosted ASan + UBSan job killed test_metal_float_moment_sum at 120 s, as it killed test_float_moment_sum before #1925. Both run the same past-2^53 frames and take 35 s on a workstation under that build; the Metal mirror now has the same 600 s timeout.
lusoris
added a commit
that referenced
this pull request
Oct 3, 2026
…st_float_moment_sum The hosted ASan + UBSan job killed test_metal_float_moment_sum at 120 s, as it killed test_float_moment_sum before #1925. Both run the same past-2^53 frames and take 35 s on a workstation under that build; the Metal mirror now has the same 600 s timeout.
lusoris
added a commit
that referenced
this pull request
Oct 4, 2026
…st_float_moment_sum The hosted ASan + UBSan job killed test_metal_float_moment_sum at 120 s, as it killed test_float_moment_sum before #1925. Both run the same past-2^53 frames and take 35 s on a workstation under that build; the Metal mirror now has the same 600 s timeout.
lusoris
added a commit
that referenced
this pull request
Oct 4, 2026
…st_float_moment_sum The hosted ASan + UBSan job killed test_metal_float_moment_sum at 120 s, as it killed test_float_moment_sum before #1925. Both run the same past-2^53 frames and take 35 s on a workstation under that build; the Metal mirror now has the same 600 s timeout.
lusoris
added a commit
that referenced
this pull request
Oct 4, 2026
…st_float_moment_sum The hosted ASan + UBSan job killed test_metal_float_moment_sum at 120 s, as it killed test_float_moment_sum before #1925. Both run the same past-2^53 frames and take 35 s on a workstation under that build; the Metal mirror now has the same 600 s timeout.
10 of 18 tasks
lusoris
added a commit
that referenced
this pull request
Oct 4, 2026
…st_float_moment_sum The hosted ASan + UBSan job killed test_metal_float_moment_sum at 120 s, as it killed test_float_moment_sum before #1925. Both run the same past-2^53 frames and take 35 s on a workstation under that build; the Metal mirror now has the same 600 s timeout.
lusoris
added a commit
that referenced
this pull request
Oct 4, 2026
…st_float_moment_sum The hosted ASan + UBSan job killed test_metal_float_moment_sum at 120 s, as it killed test_float_moment_sum before #1925. Both run the same past-2^53 frames and take 35 s on a workstation under that build; the Metal mirror now has the same 600 s timeout.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes three hosted CI breaks that #1918 introduced when it built the Metal parity tests as self-tests on every host. The changes are tests only; no library code changes.
SC_DEFAULT, whichwinuser.hdefines as0xF160, so the build failed with C2059. The scenarios are nowSC_DEFAULTS.test_metal_selftest_integer_psnrcrashed with SIGSEGV while writing the JSON output to a temporary file and readingapsnr_*back. The test now reads the aggregate straight from the context's feature collector.test_float_moment_sum(ADR-1497) hit its 120 s timeout under the debug ASan + UBSan build. Its timeout is now 600 s. The job did not produce an empty test list; the log only shows the workflow's script text, which contains that message.test_metal_selftest_float_momentfails because NEON and SVE2 add the second moment in lane order. fix(simd): add the NEON and SVE2 float_moment lanes in the scalar's order so aarch64 returns the scalar bits past 2^53 units #1923 fixes that, and this PR changes nothing for it.Type
test— test-onlyChecklist
make format && make lintis green locally. The pre-commit hooks pass, andscripts/dev/preflight.sh --stage msvcismpasses on the touched files.meson setupflags, the same introspect-and-exclude list, andrun_meson_test.py -- -C build --print-errorlogs $TESTS.test_metal_selftest_*tests passed, andtest_float_moment_sumpassed in 35 s./cross-backend-diffand the worst ULP is ≤ 2. — Not applicable: only tests changed..c/.cpp/.cu/.h/.hpp, it has the appropriate license header (seeCONTRIBUTING.md).!orBREAKING CHANGE:and the migration path is documented below. — Not breaking.docs/adr/_index_fragments/<NNNN-slug>.mdand the slug is appended todocs/adr/_index_fragments/_order.txt. — No ADR.Bug-status hygiene (ADR-0165)
docs/state.md:T-METAL-SELFTESTS-HOSTED-CI-2026-10-03is under Recently closed.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Deep-dive deliverables (ADR-0108)
AGENTS.mdinvariant note —core/test/AGENTS.d/metal-parity-tests.md: no identifiers thatwindows.hdefines, the MinGW check command, and aggregates read through the collector accessor.Reproducer
Known follow-ups