Skip to content

test(libobs): Phase 4 characterization tests (#7) - #38

Merged
zackees merged 3 commits into
grind/meta-4-9b41from
grind/7-phase4-characterization
Oct 9, 2026
Merged

zackees merged 3 commits into
grind/meta-4-9b41from
grind/7-phase4-characterization

Conversation

@zackees

@zackees zackees commented Oct 9, 2026

Copy link
Copy Markdown
Member

Refs #7

This is the first Phase 4 PR. It adds cmocka characterization tests that pin the current C behavior of the stateful, I/O and platform utilities before any Rust port starts:

  • test_file_serializer covers file-serializer.c and buffered-file-serializer.c.
  • test_config_file covers config-file.c.
  • test_threading covers threading-posix.c / threading-windows.c and the atomics.
  • test_task covers task.c.
  • test_pipe covers pipe.c / pipe-posix.c.
  • test_profiler covers profiler.c.
  • test_platform covers platform.c / platform-nix.c / platform-windows.c.

The PR also registers all seven tests in test/cmocka/CMakeLists.txt and adds the Phase 4 port order and rules to docs/rust-port/testing-policy.md.

Verification (Linux)

  • rust/tools/linux-validate/run.sh: 21/21 ctest tests pass with ENABLE_RUST_LIBOBS=OFF and with ON, including all seven new ones.
  • ./lint passes after a clang-format rewrap, which is committed separately.
  • ./unittest passes (rust-test and tier2-linux).
  • The local gate is stamped.
  • test_config_file/test_parse_duplicates passes, which confirms that lookups resolve to the later duplicate key and section (uthash head insertion).

Not verified locally

  • I did not run ctest --repeat until-fail:100 -R 'test_threading|test_task'. The integrator role cannot start containers, and the NixOS host has no OBS build dependencies.
  • Windows/macOS Tier 2 (validate.ps1/validate.sh) is left to remote CI. Areas to watch: test_platform (os_safe_replace with a backup, os_mkdir with a missing parent, MSVC warnings-as-errors), the BOM that config_save writes on Windows, and w32-pthreads linking for test_threading/test_task.

Local-Gate: v1 tree=b6be1cd0f3aecb66603e4676eb6dff324a3e7f7f secs=21 lanes=lint:run,rust-test:run,tier2-linux:run
Ci-Attestation: {"at":1791542615,"gate":"rust/all/fmt","host":"linux-x86_64","key":"8285294dc5212242511f6fae09b21b5d3c10c4eb676c0cbc0ce48f4afc0c5866","lane":"lint","parents":["9a4eee467454f54a17656f8e2fd8d5df8e430fb3"],"secs":8,"stamp":"f72754bcf571b549fa713789d8d827f7","tree":"b6be1cd0f3aecb66603e4676eb6dff324a3e7f7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791542615,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"8285294dc5212242511f6fae09b21b5d3c10c4eb676c0cbc0ce48f4afc0c5866","lane":"lint","parents":["9a4eee467454f54a17656f8e2fd8d5df8e430fb3"],"secs":8,"stamp":"44ee84eba040e80d955df3654f980fcb","tree":"b6be1cd0f3aecb66603e4676eb6dff324a3e7f7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791542615,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"89eeeb7b68e2208392ae8255531e362ddbcd4fc3fae510114996e01062e7197b","lane":"rust-test","parents":["9a4eee467454f54a17656f8e2fd8d5df8e430fb3"],"secs":3,"stamp":"205ee328c9e2e0041e66a384090ff943","tree":"b6be1cd0f3aecb66603e4676eb6dff324a3e7f7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791542615,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"fb563e2ddd55f357e72475058a283442dd8472f48644d2eb588de32d65312897","lane":"tier2-linux","parents":["9a4eee467454f54a17656f8e2fd8d5df8e430fb3"],"secs":9,"stamp":"497b787acd1208a75ca19d4d5cc15af6","tree":"b6be1cd0f3aecb66603e4676eb6dff324a3e7f7f","v":1,"via":"run"}
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.

1 participant