Skip to content

libobs: characterize and extract encoder output-list pair (Refs #5313) - #5317

Merged
zackees merged 2 commits into
masterfrom
test/5313-encoder-outputs
Nov 20, 2026
Merged

zackees merged 2 commits into
masterfrom
test/5313-encoder-outputs

Conversation

@zackees

@zackees zackees commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Refs #5313

Add a C-source cmocka characterization for obs_encoder_add_output and obs_encoder_remove_output, using real private layouts, libobs allocation and the real pthread mutex behind boundary recorders. It pins ordered append, exact middle/front/tail removal, absent-output no-op, every NULL encoder/output combination and duplicates: add retains them and remove erases only the first match (characterized, not endorsed). The recorder checks the exact outputs mutex and list state before locking and before unlocking, so mutation must occur inside that pair.

Move both functions verbatim from libobs/obs-encoder.c.h into libobs/obs-encoder-outputs.c.h and add the include alphabetically to the core-output unity group. Following the latest merged encoder extraction #5215, register the fixture in both sections of the canonical test graph and add its tests.d pointer. Cargo-native libobs common sources use the same core-output unity group on macOS and Windows; there is no additional platform-specific implementation list to amend. No held support paths are touched.

RED: the characterization registration names the not-yet-created extraction. Replaying its configured source-wrapper compile fails with obs-encoder-outputs.c.h: No such file or directory; the focused Linux Tier 2 build fails for the same reason. GREEN supplies the byte-identical bodies and production registration.

The focused Linux Tier 2 build rebuilt hybrid libobs, libobs-c-reference and the fixture. All four characterization cases pass against each library (CTest OFF 1.83 s; ON 1.37 s); the exported symbol sets match at 1,769 symbols. The whole new test compiles cleanly with Clang 21.1.8 under -Wshorten-64-to-32 -Wconversion -Werror, and with GCC under -Wconversion -Werror. Counts, capacities and loop indexes use size_t; pthread results use int. Native MSVC/macOS execution is not claimed.

The single final full ./lint invocation passed in 294.8 s, with matching Rust analysis verdicts reused where reported. Build-group and graph-order checks pass; the single-agent clud-review found no issues. No Rust test executable was added. The RED head is 295d5f9; the pre-attestation GREEN commit is 3506cbc1d25bcbfaac7bd7b95ad55b4853e6eab8. Rust Tier 1/Tier 3 and protocol Tier 4 do not apply to this C-only prerequisite. This fixture characterizes the C source; the later swap must link real Rust adapters without changing this test. Follow-up swap: #5315.

./push published final head 095460e with partial prooft evidence (18 client-lint/validator records). All 9,264 workspace tests passed with six skips. The feature suite passed 919 of 920 cases; the existing obs-util dead_pipe_write_survives_concurrent_spawns case hung for several minutes and its two verified owned processes were terminated. No host-test attestation or complete fast-admission claim is made: ordinary selected PR CI remains required. The source tree is identical to the validated pre-attestation GREEN commit. No native-coverage label applies to this shared C-only change.

DRAFT-HELD: the final backpressure check exited 75: counted=7 parked_red=0; oldest queued job has waited 20 min for a runner. Keep this PR draft with auto-merge off until admission reopens. This hold is for runner starvation; no held #5246 support paths are changed.

Ci-Attestation: {"at":1795137390,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":218,"stamp":"8232963ae0693c47eab238768a994ffc","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137390,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":218,"stamp":"7edda19828e37f9afd644d0498d20fe0","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137390,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":218,"stamp":"661a9222d892c88d04f57bd4ee0f63ed","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137390,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":218,"stamp":"c9ac0281afbedfea1e87b00d390e5b48","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137163,"gate":"general/all/client-lint","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"44736c042c880ea222b111cf33133138","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137390,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":218,"stamp":"f827599f65ea19de0f721b9c308a33d2","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137167,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"1b912cde77ed85729f307eac12d7f598","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137168,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"4e23f9706db8d2030c9ef9c6b520b35a","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137165,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"fb92828108d30ef0c3c72bf2ddd08d32","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137166,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"23de90ebca0915022190f3628e4be68e","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137164,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"4f3f6f5beb500eebe829b005e1209382","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137164,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"38bce4657f1426f8f851044037034a70","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137166,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"91ed06b4eaa7a99efb9d9f079335fee9","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137166,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"6e692dfdfac187a3ea662f0069e002b6","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137164,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"631fd9226bd974b80e12389140d951a6","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137165,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"b33a50ec2e3ab5a92a054976873f5142","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137163,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"96b6eeeaddf7fdfb76919ad3b20473dc","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
Ci-Attestation: {"at":1795137163,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"d43570fc3e98d511606b6dd7f9772507c3f99308cbd41ab9af9695ec54b82983","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":424,"stamp":"92885ad4ff696193813123b752d33fad","tree":"6ac7ad230e588c73f150d97b205a51382cba00bd","v":1,"via":"run"}
@zackees
zackees marked this pull request as draft November 20, 2026 01:23
@zackees zackees added the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 20, 2026
@zackees zackees changed the title test: require encoder output-list extraction (RED, Refs #5313) libobs: characterize and extract encoder output-list pair (Refs #5313) Nov 20, 2026
Ci-Attestation: {"at":1795138791,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":279,"stamp":"d0f0d2f00b376acbf98d9d7dad6aabd4","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138791,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":279,"stamp":"d7b7cab444d1812d9c6e969a7dad30ca","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138791,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":279,"stamp":"61423f2b9ad580001c71b31f2aaf760b","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138791,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":279,"stamp":"869333bc7f5147a9e8d9da563972d9ab","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138490,"gate":"general/all/client-lint","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"d8c7017296131966cc4ad0976da8ba0b","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138791,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":279,"stamp":"cf9d9dfa23287cffb4790560d011e1c9","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138497,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"f2b9ec7db7b050b50a550b4969f6f96f","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138498,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"b5b41ad11dd5f6e08525198597d65490","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138496,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"d5dcfbda3478d50b0ba52a16fdf01b7b","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138496,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"f11fbc8cfc2ae60de07209c7b821474e","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138492,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"9e8cf40cf3187ddc3e88896962b4b093","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138493,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"2a1cca998b5f6cbfc165c6cf188a6296","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138496,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"e6d3bf189c6e566d05238d8fc30faa22","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138497,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"2a899d8dc09c3230902a1d24bd18448f","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138494,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"cebf1a848a0d0ebcd1b36948e3bcdb4f","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138495,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"c9380b1463440efc5451bbfe80dd8284","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138490,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"104523122b3d545bcec55dbb73082fc2","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
Ci-Attestation: {"at":1795138491,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"7fd84523c7594843774ffdb4c6e4a7dfa3cf60ec47df4a66a42633b601cc9990","lane":"client-lint","parents":["295d5f980eb69fe29c5f4e1bcc3938c34e40a333"],"secs":99,"stamp":"011a7eceea1e73f38802d22fa0ffe004","tree":"ceb04b5326dd930cdf087f34a9cee2be7c8745da","v":1,"via":"run"}
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 20, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this to In progress in obs-rust Multiview Nov 20, 2026
@zackees
zackees marked this pull request as ready for review November 20, 2026 10:11
@zackees
zackees added this pull request to the merge queue Nov 20, 2026
Merged via the queue into master with commit 991d3ce Nov 20, 2026
46 checks passed
@zackees
zackees deleted the test/5313-encoder-outputs branch November 20, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

1 participant