Skip to content

test(graphics): characterize effect parser lifecycle before Rust port - #1646

Merged
zackees merged 2 commits into
obs-rust:masterfrom
nathan-v:test/effect-parser-lifecycle-characterization
Oct 21, 2026
Merged

zackees merged 2 commits into
obs-rust:masterfrom
nathan-v:test/effect-parser-lifecycle-characterization

Conversation

@nathan-v

@nathan-v nathan-v commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Change

Before porting effect-parser cleanup, pin the original C ownership behavior without requiring a graphics device. Move ep_free verbatim into graphics/effect-parser-lifecycle.c.h in the existing unity group, then add eight cmocka cases for empty/repeated cleanup, nested annotations, structures, functions and borrowed dependency strings, samplers, techniques/passes, lexer/preprocessor state, and retained/borrowed fields.

The source has no exported ep_free symbol, so this test compiles the extracted C and links libobs for its dependencies. OFF/ON runs characterize that C with both dependency implementations; they do not establish compatibility of a future Rust replacement. That later PR needs its own Rust seam, layout checks, RED/GREEN and differential tests. No Rust, public headers, existing C tests, or public behavior change here.

Refs #1644; Phase 6 tracker #444.

Validation

  • f0cdc4bf8: extraction; function body checked byte-for-byte against base 01561bf05.
  • 91ff26ff3: characterization; native macOS arm64 CMake target builds and all 8 cases pass with ASan/UBSan. The local Xcode executable required ad-hoc signing and explicit build-tree DYLD paths for Homebrew cmocka/libobs.
  • Temporary out-of-tree mutation removing ep_param_free fails 2 cases on allocation imbalance; the committed C is unchanged.
  • Pinned clang-format/gersemi, ci/test_build_groups.py, ci/test_cmocka_sanitize.py, and git diff --check pass.
  • Full ./lint is not green locally: ten unrelated CI Python suites fail on host/platform fixtures (including macOS C++ stub headers and /var versus /private/var paths). No local-gate attestation claimed.
  • Native Rust workspace tests and doctests passed. ./unittest then stopped at the Windows GNU cross-build: Soldr does not support that target from this macOS host, so its Linux Tier 2 lane did not run. Required PR CI is green on 91ff26ff3: Fast Gate, formatting, Linux Tier 2 build, all four OFF/ON shards, and CI Gate. Logs explicitly show test_effect_parser_lifecycle passing in OFF shard 2 and ON shard 1. This is a characterization-only prerequisite, so Rust RED/GREEN and Tier 3 belong to the later port; Tier 4 does not apply to this internal cleanup routine.

@nathan-v
nathan-v marked this pull request as ready for review October 21, 2026 19:34
@nathan-v
nathan-v requested a review from zackees as a code owner October 21, 2026 19:34
@zackees
zackees added this pull request to the merge queue Oct 21, 2026
Merged via the queue into obs-rust:master with commit 5d2cd45 Oct 21, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants