Repository navigation
test: characterize canvas channel replacement - #5142
Conversation
|
Rebased this PR onto current |
d705a8c to
89bc23b
Compare
zackees
left a comment
There was a problem hiding this comment.
Coordinator review (2026-11-21).
Read the diff against master: one new GPU-free cmocka fixture, test_canvas_channel_setter, registered once in test/cmocka/build/test-graph.json. No existing C test or public header is touched.
Correctness: each assertion matches obs_canvas_set_channel in libobs/obs-canvas.c.h:
- The local signal fires, then the global one, and the global one only for the main canvas (
obs-canvas.c.h:311-313). - Reinstalling the same source is a no-op.
- On replacement, the incoming source is activated before the outgoing one is deactivated.
Reference handling is balanced: obs_get_main_canvas() returns a reference, which teardown releases, and the obs_canvas_get_channel() reference is released too.
Tiers: this is the characterization stage under the testing policy's "units without C tests" section. The extraction PR for #5134 will need the RED → GREEN pair, and Tier 2 must pass against both the hybrid build and the C reference. This PR is test-only, so it needs no features-ledger line.
Nits (not blocking):
tests.d/canvas_channel_setter.cmakecontains only a comment. If the graph is the single registration point, check whether other fixtures keep an emptytests.dstub. If they don't, drop it.- Please confirm the test passes 100 serial repeats (
rust/tools/linux-validate/run.py --repeat 100 --tests test_canvas_channel_setter). It is a signal and activation ordering test, and the policy asks for that on threading-adjacent cases.
Because this PR comes from a fork, its CI had not run since 2026-11-18 (action_required). I approved the pending runs. I'll queue the PR once CI is green.
|
Coordinator: CI ran (Tier 2 Linux, tests OFF and ON, both fail the same way), and the new test fails on its first assertion block: (job log) Cause: Two ways to fix it, without touching libobs:
Option 1 matches the PR's stated scope (signal routing, payloads, refcount-level activation). Once it is green, the coordinator will queue it. |
|
I updated the characterization to match the fixture’s execution model: source active refcounts change synchronously, while activate/deactivate callbacks are deferred until a video tick. The test now asserts refcounts and local/global signal payloads without claiming callback ordering. The focused Tier 2 |
|
Follow-up: I ran the coordinator-requested 100 serial repetitions. |
|
Coordinator: approved the fork workflow run for bc9a232, so PR CI is running now. The diff is test-only (the new cmocka fixture, its comment-only |
bc9a232 to
fc8dfb3
Compare
Summary
obs_canvas_set_channel: initial assignment, same-source no-op, replacement, clear, local/global signal routing, and signal payloads.This is the characterization stage for #5134. The production C extraction will follow after the baseline fixture is confirmed by CI.
Validation
uv run ci/test_test_graph_sorted.py— passed.git diff --check— passed.test_canvas_channel_setter) — passed 100 serial repeats against bothlibobs-c-referenceand hybridlibobs, under the repository'sxvfb-runwrapper.