Skip to content

fix(test): give the compat library tests the whole compiler command - #2603

Merged
lusoris merged 1 commit into
masterfrom
fix/compat-tests-full-compiler-command
Oct 8, 2026
Merged

lusoris merged 1 commit into
masterfrom
fix/compat-tests-full-compiler-command

Conversation

@lusoris

@lusoris lusoris commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Both sanitizer legs (TSan and ASan+UBSan, run 37760287719) fail on master since #2303 (14dc2972d):

  • test_compat_library_gates: test_engine_symbol_does_not_link and test_exported_vmafx_function_links fail.
  • test_libvmaf_deprecation: its three compile cases fail.

Every failure prints /usr/bin/ccache: invalid option -- 'a' (or -- 'W'). The cause is not the sanitizers:

  • core/test/meson.build passed the tests cc.cmd_array()[0], the first word of the compiler command.
  • Those legs build with CC='ccache clang-22', where the first word is the launcher, so the tests ran ccache -shared ....
  • Any build with a compiler launcher fails the same way. No library or score is wrong.

The fix:

  • Meson passes the whole compiler command, one word per --cc=<word> argument (vmaf_test_cc_args).
  • Both tests read it through the new core/test/meson_cc.py.
  • The compat AGENTS page records the rule: never cc.cmd_array()[0].

Type

  • fix — bug fix
  • test — test-only

Checklist

  • Commits follow Conventional Commits (the commit-msg hook enforces this).
  • Every commit is signed off (git commit -s). See DCO sign-off.
  • make format && make lint is green locally: the commit hooks pass (ruff, markdownlint, caveman, generated-index freshness).
  • Unit tests pass. CPU build (-Db_lto=false, -j4, warnings as errors):
    • build: 0 warnings;
    • --suite=fast: 410 OK, 0 fail;
    • codegen tests: 132 passed;
    • make test-netflix-golden: 280 passed, 3 skipped;
    • preflight.sh --stage msvcism: pass;
    • affected suites: pass.
  • If I touched any SIMD/GPU code path, I ran /cross-backend-diff and the worst ULP is ≤ 2. (not applicable)
  • If I touched a feature extractor with SIMD/GPU twins, I either updated every twin or listed the gap under "Known follow-ups" below. (not applicable)
  • If I added a new .c / .cpp / .cu / .h / .hpp, it has the appropriate license header (see CONTRIBUTING.md). (meson_cc.py carries the EUPL-1.2 header)
  • If this is a breaking change, the commit message uses ! or BREAKING CHANGE: and the migration path is documented below. (not breaking)
  • If this PR adds an ADR, the ADR row lives in docs/adr/_index_fragments/<NNNN-slug>.md and nothing else is touched for the index. (no ADR)

Bug-status hygiene (ADR-0165)

  • docs/state.md updated in this PR with a row under Recently closed: T-COMPAT-TESTS-CCACHE-FIRST-WORD-2026-10-08.

Netflix golden-data gate (ADR-0024)

  • I did not modify any assertAlmostEqual(...) score in the Netflix golden Python tests.
  • If I believe a golden value must change, I have explained why below AND pinged @lusoris for a CODEOWNERS exception. (no golden value changes)

Deep-dive deliverables (ADR-0108)

  • Research digest — no digest needed: trivial; the tests took one word of a list.
  • Decision matrix — no alternatives: only-one-way fix. A shell string with shlex would break on a compiler path with spaces, and skipping under ccache would drop the coverage.
  • AGENTS.md invariant note — core/src/AGENTS.d/vmafx-compat.md: compiler-driving tests take the whole command (--cc= words), never cc.cmd_array()[0].
  • Reproducer / smoke-test command — pasted below under "Reproducer".
  • CHANGELOG fragment — no changelog needed: test harness only.
  • Rebase note — no rebase impact: fork-only tests.

Reproducer

# ccache on PATH; the same configuration as the CI sanitizer legs
CC='ccache clang' CXX='ccache clang++' LDFLAGS=-fuse-ld=lld meson setup build core \
  -Db_sanitize=address -Dc_args='-fsanitize=undefined -fno-sanitize=function' \
  -Dcpp_args='-fsanitize=undefined -fno-sanitize=function' --buildtype=debug \
  -Db_lto=false -Db_lundef=false -Denable_cuda=false -Denable_sycl=false
python3 scripts/ci/run_meson_test.py -- -C build test_compat_library_gates test_libvmaf_deprecation

Evidence

Local runs used ccache 4.13.6 (the upstream release binary) and clang 23.1.1, configured like the CI legs.

  • Master's two tests, given the first word as master's meson.build passes it, fail with the CI's messages: ccache: invalid option -- 'a' and -- 'W'.
  • With this PR, meson test passes in an ASan+UBSan build: test_compat_library_gates, test_libvmaf_deprecation, check_exported_symbols and check_exported_symbols_libvmaf, 4 OK.
  • In a TSan build, the two tests are 2 OK.

Known follow-ups

None.

@github-actions github-actions Bot added the type:bug Something isn't working label Oct 8, 2026
…2603)

* fix(test): give the compat library tests the whole compiler command

Both sanitizer legs (TSan, ASan+UBSan; run 37760287719) failed on master
after #2303: test_compat_library_gates and test_libvmaf_deprecation ran
/usr/bin/ccache with compiler flags ("ccache: invalid option -- 'a'").
core/test/meson.build passed cc.cmd_array()[0], and those legs build with
CC='ccache clang-22', where the first word is the launcher. Any build with
a compiler launcher failed the same way; the sanitizers play no part.

Meson now passes the whole command, one word per --cc=<word> argument
(vmaf_test_cc_args), and both tests read it through core/test/meson_cc.py.
The compat AGENTS page records the rule.

Tests: with ccache 4.13.6 and clang 23 configured like the CI legs
(CC='ccache clang', lld, -Db_lundef=false), master's two tests fail with
the CI's messages; the fixed ones pass through meson test in an ASan+UBSan
build (with check_exported_symbols and check_exported_symbols_libvmaf) and
in a TSan build.

Signed-off-by: Lusoris <lusoris@proton.me>
@lusoris
lusoris force-pushed the fix/compat-tests-full-compiler-command branch from 0124f80 to 4bd0a42 Compare October 8, 2026 11:43
@lusoris
lusoris merged commit 4bd0a42 into master Oct 8, 2026
23 of 45 checks passed
@lusoris
lusoris deleted the fix/compat-tests-full-compiler-command branch October 8, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant