Repository navigation
Description
Location
test/cmocka/test_module_load_steps.c:65-67 (added by 4f74ca8, "libobs: Port the module load rules to obs-core (#2807)"):
bool missing = (asked++, obs_module_load_rules_arg_missing(m)) ||
(asked++, obs_module_load_rules_arg_missing(p)) ||
(asked++, obs_module_load_rules_arg_missing(c));test/cmocka/CMakeLists.txt turns on the clang C option set, which includes -Wcomma (cmake/common/compiler_common.cmake:54), and the macOS CI preset sets CMAKE_COMPILE_WARNING_AS_ERROR: true (CMakePresets.json, macos-ci).
Class
Broken CI lane: master's macOS Tier 2 lane (a merge gate) fails to compile, so every PR that selects it is red for a reason unrelated to its change.
test/cmocka/test_module_load_steps.c:65:26: error: possible misuse of comma operator here [-Werror,-Wcomma]
test/cmocka/test_module_load_steps.c:66:19: error: possible misuse of comma operator here [-Werror,-Wcomma]
test/cmocka/test_module_load_steps.c:67:19: error: possible misuse of comma operator here [-Werror,-Wcomma]
** BUILD FAILED **
How it is reached
Build 🧱 / Rust Tier 2 (macos-26) → rust/tools/tier2-validate/validate.sh → macos-ci preset (CMAKE_COMPILE_WARNING_AS_ERROR=ON) → the cmocka test target. The comma operator is intentional (the test counts how many operands the || chain actually evaluated), so it is not a defect in the test.
The PR that added the file (#2807) had macOS Tier 2 skipped by the lane-selection table (ci/ci_scope.py), and master pushes do not build macOS unless a macOS path changes, so the break reached master unseen. It surfaces now on any PR that selects test/cmocka/ or the shared cmake config, e.g. #2691 (run 40753946475, job 123054397646).
Linux Tier 2 does not catch it: the Docker Tier 2 build does not set CMAKE_COMPILE_WARNING_AS_ERROR, so the same line is a warning there.
Proposed fix and failing test
Do not edit the C test (AGENTS.md: existing C tests are never edited to satisfy a warning). Suppress the class for the test target, where the file already does exactly this for -Wpedantic/-Wmissing-prototypes/-Wstrict-prototypes:
add_compile_options($<$<COMPILE_LANG_AND_ID:C,AppleClang,Clang,GNU>:-Wno-comma>)with a comment naming the deliberate comma operator in test_module_load_steps.c.
RED: the existing macOS Tier 2 job above (a clean master checkout of 0faa3c1 fails to build once the lane is selected). GREEN: the same lane configures and builds, and the cmocka suite runs. Local confirmation of either direction needs a macOS host; the lane itself is the gate.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 28, 2026
Claiming: #2842 — macOS Tier 2 build break from
-Wcomma-Wcommafor the cmocka test target intest/cmocka/CMakeLists.txt, next to the existing-Wno-pedantic/-Wno-missing-prototypesexemptions, with a comment naming the deliberate comma operator intest_module_load_steps.c(the C test itself stays untouched).fix/2842-macos-wcommawith the RED evidence (macOS Tier 2 log from run 40753946475) and the GREEN commit, and open the PR againstmaster.zackees commentedon Oct 28, 2026
Triage: labels
P0andsize:S.P0because this is a red merge gate on master, not a normal bug: while it stands, any PR that selectstest/cmocka/(or the shared cmake config) is red for a reason unrelated to its change — #2691's run 40753946475 is the example in the report. The fix is already in flight as #2843 (-Wno-commaon the cmocka C target, per the proposed fix here), so nothing else is needed on this issue; the merge of #2843 is what closes it.build(cmocka): compile the C tests with -Wno-comma (obs-rust#2842) (o…