Repository navigation
test: characterize obs-data.c before port - #788
Merged
Merged
Conversation
cmocka test pinning the current C behavior of libobs/obs-data.c ahead of the obs-data port. Phase 6, first core seam on obs-rust#444. No Rust. The public header stays as it is, and obs_data_newref stays inline. Pins JSON parse and dump, missing keys, user/default/autoselect precedence, apply/erase/clear, arrays and item iteration, vec2 and frame-rate helpers, and the safe file save/load path. Odd cases are marked characterized, not endorsed. An array root becomes an empty object, and a scalar root is rejected. A default-only or autoselect-only item is readable through the user getter. set_autoselect of a different type changes the item type. Refs obs-rust#784 Refs obs-rust#444 Local-Gate: v1 tree=f6453a233d5598d6f264ec2549e844b4e24f4696 secs=512 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1792025343,"gate":"rust/all/fmt","host":"linux-x86_64","key":"0468294dcc8688902914796a4a57e83c80c74e436e8d308dac7b0c4fde9ef6db","lane":"lint","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":52,"stamp":"0e6471e45b922beef26fe8141f338e89","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"} Ci-Attestation: {"at":1792025343,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"0468294dcc8688902914796a4a57e83c80c74e436e8d308dac7b0c4fde9ef6db","lane":"lint","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":52,"stamp":"591c48ec1abd5203af1de92dab5b64d7","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"} Ci-Attestation: {"at":1792025343,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"dffd0a853e89892f51ffe4d93ee9a2fd438f550032d62c6850f84b46a3da72e2","lane":"rust-test","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":123,"stamp":"e5a012bbdade16a321d5d8d6047cb156","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"} Ci-Attestation: {"at":1792025343,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"1ac96f669b6590ace668e9edb8afee059802acf1ab3285563852b1096e39815c","lane":"cross","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":117,"stamp":"fc2619b15b2b265cf51d07e6235f480d","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"} Ci-Attestation: {"at":1792025343,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"1ac96f669b6590ace668e9edb8afee059802acf1ab3285563852b1096e39815c","lane":"cross","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":117,"stamp":"2d06855feebb58c4b4441a8dbe5c0707","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"} Ci-Attestation: {"at":1792025343,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"1ac96f669b6590ace668e9edb8afee059802acf1ab3285563852b1096e39815c","lane":"cross","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":117,"stamp":"ba4acb3eba3bdedc5f21200c0309375d","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"} Ci-Attestation: {"at":1792025343,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"1ac96f669b6590ace668e9edb8afee059802acf1ab3285563852b1096e39815c","lane":"cross","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":117,"stamp":"2af46b1ef2c0238f0ad10718d669cef0","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"} Ci-Attestation: {"at":1792025343,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"1ac96f669b6590ace668e9edb8afee059802acf1ab3285563852b1096e39815c","lane":"cross","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":117,"stamp":"40a65ca0da7e528a5ed1fca914369df0","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"} Ci-Attestation: {"at":1792025343,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"1ac96f669b6590ace668e9edb8afee059802acf1ab3285563852b1096e39815c","lane":"cross","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":117,"stamp":"c646f268ce216a87071df7ddb7fdb1f5","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"} Ci-Attestation: {"at":1792025343,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"dc773f3190d85f18abfa319f54807bd3a3e64712def8e34abe938e9f378a5ad4","lane":"tier2-linux","parents":["18e24cc432fd40eb74c1a102e941aa040a5708bf"],"secs":221,"stamp":"70c69492eac09e60e9ca153f02c24278","tree":"f6453a233d5598d6f264ec2549e844b4e24f4696","v":1,"via":"run"}
Member
zackees
force-pushed
the
test/obs-data
branch
from
October 15, 2026 00:49
e57ac47 to
f87dc1f
Compare
zackees
enabled auto-merge
October 15, 2026 00:49
4 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #784
Refs #444
What and why
Pins the current C behavior of libobs/obs-data.c before the port. This is the Phase 6 first core seam on #444. The test is cmocka, registered from tests.d, and it links OBS::libobs. There is no Rust in this PR. obs-data.h is unchanged, and obs_data_newref stays inline in the header.
The 8 tests passed locally with ENABLE_RUST_LIBOBS OFF and ON. obs-data.c is still compiled in both builds.
A few behaviors are marked characterized, not endorsed. json_loads is called without JSON_DECODE_ANY, so an array root becomes an empty object and a scalar root is rejected. A default-only or autoselect-only item is readable through the user getter, and JSON still omits an item with no user value unless with-defaults is requested. set_autoselect of a different type changes the item type. obs_data_item_remove drops the object's reference and leaves the caller's.
Please add the claimed label on #784; I cannot.
RED → GREEN
Checklist
master(or the description starts with a Stacked: note)-W..., ratchets): built with theci-fulllabel, or with scripting ON and cross-checked with clang and MSVCNo warning or flag changes in this PR. No Rust differences yet.