Summary
The vendor/cmock submodule is pinned to commit cb1ad78 (2017-11-14, ~tag v2.4.6). Upstream cmock is currently at v2.7.0, 463 commits ahead of our pin.
The pinned commit predates upstream's own fix (bbfaf04, landed in v2.6.0, 2023-02-06) for cmock_config.rb failing to parse YAML anchors/aliases under Ruby 3.1+ (Psych 4's default restricted loader raises Psych::AliasesNotEnabled). That specific symptom was worked around locally in #1649 by removing the anchors/aliases from tools/test/gcc.yml — but the underlying vendored code is still 9 years old, and any other Ruby-version incompatibility upstream has since fixed is still present here.
Proposed fix
Bump the vendor/cmock submodule pin to v2.7.0 (or latest at time of work), then:
- Re-run the full unit test suite locally (
make unit) and confirm 0 failures.
- Re-run the full CI matrix (
basic_build, features, kbuild-targets, kbuild-targets-random) since mock generation behavior may have changed across 3 major versions (naming conventions, config option handling, exclude/include heuristics, etc.).
Optionally, revert the tools/test/gcc.yml anchor removal from #1649 once the updated cmock handles aliases correctly again, to restore the DRY config.
Summary
The
vendor/cmocksubmodule is pinned to commitcb1ad78(2017-11-14, ~tagv2.4.6). Upstreamcmockis currently atv2.7.0, 463 commits ahead of our pin.The pinned commit predates upstream's own fix (
bbfaf04, landed inv2.6.0, 2023-02-06) forcmock_config.rbfailing to parse YAML anchors/aliases under Ruby 3.1+ (Psych 4's default restricted loader raisesPsych::AliasesNotEnabled). That specific symptom was worked around locally in #1649 by removing the anchors/aliases fromtools/test/gcc.yml— but the underlying vendored code is still 9 years old, and any other Ruby-version incompatibility upstream has since fixed is still present here.Proposed fix
Bump the
vendor/cmocksubmodule pin tov2.7.0(or latest at time of work), then:make unit) and confirm 0 failures.basic_build,features,kbuild-targets,kbuild-targets-random) since mock generation behavior may have changed across 3 major versions (naming conventions, config option handling, exclude/include heuristics, etc.).Optionally, revert the
tools/test/gcc.ymlanchor removal from #1649 once the updated cmock handles aliases correctly again, to restore the DRY config.