Skip to content

test: characterize obs-view before the Rust port (#1933) - #1934

Merged
zackees merged 2 commits into
masterfrom
test/1933-view
Oct 23, 2026
Merged

zackees merged 2 commits into
masterfrom
test/1933-view

Conversation

@zackees

@zackees zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member

Refs #1933. Tier 2 characterization of libobs/obs-view.c.h before the port.

test/cmocka/test_view.c pins, through the public API: create/destroy (all channels empty), set/get (an aux view shows but does not activate; the view holds its own ref), replace and clear (the old source is hidden and released; the same source in two channels shows twice), the NULL cases, render dropping a removed source (characterized, not endorsed: it releases the ref without deactivating, so the source stays "showing"), and add/enum/remove with no video reset (no mix, no callbacks). Out-of-range channels are checked only in NDEBUG builds, since the C asserts first.

No graphics device is created: the test never renders a live source or creates a mix. Source destruction runs on libobs's destruction thread, so each destroy count waits on obs_wait_for_destroy_queue(). Same xvfb-run group setup as the service tests. Characterization of existing behaviour, so no RED/GREEN pair; not user-visible.

@zackees

zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Coordinator: Tier 2 Linux fails in both the tests ON and tests OFF jobs, and it's the new test, not a flake:

error: Required value 'get_width' for 'test_view_source' not found.  obs_register_source failed.
error: Source ID 'test_view_source' not found
test/cmocka/test_view.c:149: error: Failure!
[  FAILED  ] test_set_get_source

obs_register_source rejects a video source that has no get_width/get_height, so test_view_source has to provide both (or not set OBS_SOURCE_VIDEO).

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