Skip to content

test: guard native module loading regressions#227

Draft
cursor[bot] wants to merge 2 commits into
next-gen-5from
cursor/missing-test-coverage-4e78
Draft

test: guard native module loading regressions#227
cursor[bot] wants to merge 2 commits into
next-gen-5from
cursor/missing-test-coverage-4e78

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 27, 2026

Summary

  • Add test_native_module_regressions to guard native VM call argument handling and pk3-backed native library extraction/cache invariants.
  • Register the new script with CTest and document it in tests/README.md.

Risky behavior now covered

  • Native VM_Call zero-fills omitted vmMain args before copying varargs and passes three stable native slots.
  • Native module alias fallback order stays compatible for legacy/project module names.
  • pk3-backed native libraries remain cvar-gated, extracted by basename under vm/native_cache/, cache-reused only after length/CRC validation, and tried before loose filesystem paths.

Test files added/updated

  • Added tests/scripts/test_native_module_regressions.sh
  • Updated CMakeLists.txt
  • Updated tests/README.md

Why this reduces regression risk

This path affects native game/cgame/ui module startup and full-conversion compatibility. The guards pin security- and compatibility-sensitive behavior that is hard to exercise in headless CI, especially pk3 extraction/cache ordering and native vararg handling.

Validation

  • tests/scripts/test_native_module_regressions.sh
  • cmake -S . -B build-coverage-tests -DBUILD_TESTING=ON -DBUILD_UNIT_TESTS=OFF && ctest --test-dir build-coverage-tests -R test_native_module_regressions --output-on-failure
Open in Web View Automation 

cursoragent and others added 2 commits May 27, 2026 10:04
Co-authored-by: Tim Fox <timfox@outlook.com>
Co-authored-by: Tim Fox <timfox@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant