Repository navigation
test: Wait for visibility transition sources - #2489
Merged
Merged
Conversation
test_visibility_transition reuses the names a to e in every case. The
video thread holds a reference on each source while it ticks, so the
teardown's release is not always the scene's last one: the video
thread then destroys the scene after the destruction queue was
flushed, the previous case's boxes are still alive, and libobs renames
the new ones ("c 2 Show Transition", seen in the PR CI of obs-rust#2475).
The teardown now waits for the "destroy" signal of the scene, the
group and every box before the next case runs. The cases and their
assertions are unchanged.
Fixes obs-rust#2479
Member
|
Coordinator review: a flake fix (#2479). It adds a teardown wait until the scene, the group and every box have signalled destroy, capped at 10 s, so the next case's identically named sources aren't renamed. It doesn't change an assertion or what the test checks, so it fits the no-C-test-edit rule, which is about making a port pass. Queuing. |
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.
Fixes #2479
What and why
test_visibility_transitionfails now and then:show_transition_three_itemsgets"c 2 Show Transition" != "c Show Transition", after libobs renamed the case's boxes a to e and its group ("Attempted to insert context with duplicate name"). It was seen in the PR CI of #2475 (Rust Tier 2 Linux, tests ON) and passed on rerun.Every case creates its boxes with the same names, a to e. The teardown releases the scene and the boxes and then flushes libobs's destruction queue, but the release is not always the scene's last reference: the video thread takes a reference on every source while it ticks them (
tick_sources()). When it holds the scene at that moment, it destroys the scene itself a little later, after the flush. The boxes stay alive in the scene until then, their names are still taken when the next case creates its own, and libobs renames them ("c 2"). In the CI log the scene's own name was free in the next case but a to e and the group were not, which fits this order.The teardown now connects to the
destroysignal of the scene, the group and the five boxes before it releases them, and waits (up to 10 s) until all seven have fired.destroyis signalled after a source's name is freed, so the next case can no longer meet the old names. If they are not all destroyed in time, the teardown says so and fails, instead of the next case failing on a name. The flush that was already there stays. The eight cases and their assertions are unchanged.RED → GREEN
A flake has no deterministic RED, so here is how it was reproduced instead:
tick_sources()sleep 50 ms between taking its references and releasing them (OBS_SCRATCH_TICK_HOLD_MS=50). With that libobs, the same test binary run 200 times on each lane:Every master failure was the CI one:
"c 2 Show Transition" != "c Show Transition"inshow_transition_three_items.--lane lintok,--test-diff origin/masterpassed,--lane crossok.Checklist
masterdocs/features.mdis added or updated (not applicable: no user-visible change)-W..., ratchets): not applicable