Repository navigation
test(cmocka): test_darken_transparent measures the drawn scene (#3389) - #3433
Merged
Merged
Conversation
…3389) Drop its flaky entry from the sanitizer known list. In the asan job (run 41281819710), darken_keeps_background_where_transparent failed at test_darken_transparent.c:325 because the first run_scene() measured before the scene was drawn: normal: mean luma left (transparent) 0.0, right (opaque) 0.0 (black is 16) run_scene() stops after 10 encoded frames, and under load the first frames reach the probe encoder as an all-zero NV12 buffer. Fails: the asan job, under load, as in run 41281819710; locally under load as recorded in the GREEN commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…#3389) The probe encoder counts the frames that show the scene (the opaque half above video black, 16), and run_scene() measures once 10 of them arrived, for up to 10 s instead of 3 s, so the slower sanitizer builds under load have room. If they never arrive the case fails with that message instead of comparing undrawn frames. No assertion is removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=1f0259860f8615a801a299e434a61ef10626812f secs=262 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a Ci-Attestation: {"at":1793545713,"gate":"rust/all/fmt","host":"linux-x86_64","key":"cbcf5ddabbcc82d6beac476a7f52c7944b7614a086d3c244a44dcd1f1cac64a2","lane":"lint","parents":["eefd078a9f126edf9b990cbb49fca470200d52f6"],"secs":38,"stamp":"30e257e35c0f649bad189c35061d0277","tree":"1f0259860f8615a801a299e434a61ef10626812f","v":1,"via":"run"} Ci-Attestation: {"at":1793545713,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"cbcf5ddabbcc82d6beac476a7f52c7944b7614a086d3c244a44dcd1f1cac64a2","lane":"lint","parents":["eefd078a9f126edf9b990cbb49fca470200d52f6"],"secs":38,"stamp":"d6a54bf9ad3ac8274441e29c2a0913b1","tree":"1f0259860f8615a801a299e434a61ef10626812f","v":1,"via":"run"} Ci-Attestation: {"at":1793545713,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"c9feb1708a900e09b69c96ea29722ade956fbf945a8e3d8023cac80b17b187b9","lane":"rust-test","parents":["eefd078a9f126edf9b990cbb49fca470200d52f6"],"secs":81,"stamp":"d0fa3e25bee7df1b9b2c7766b787d2ac","tree":"1f0259860f8615a801a299e434a61ef10626812f","v":1,"via":"run"} Ci-Attestation: {"at":1793545713,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"5988a515b6c53d16e303281a99b1f4ab78246c3d04a14b396fd0e2a1105aff0f","lane":"cross","parents":["eefd078a9f126edf9b990cbb49fca470200d52f6"],"secs":37,"stamp":"4634765efcd50586158bf01552298c77","tree":"1f0259860f8615a801a299e434a61ef10626812f","v":1,"via":"run"} Ci-Attestation: {"at":1793545713,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"5988a515b6c53d16e303281a99b1f4ab78246c3d04a14b396fd0e2a1105aff0f","lane":"cross","parents":["eefd078a9f126edf9b990cbb49fca470200d52f6"],"secs":37,"stamp":"e51d59f5042559ed99afb01a2ccb0c0b","tree":"1f0259860f8615a801a299e434a61ef10626812f","v":1,"via":"run"} Ci-Attestation: {"at":1793545713,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"5988a515b6c53d16e303281a99b1f4ab78246c3d04a14b396fd0e2a1105aff0f","lane":"cross","parents":["eefd078a9f126edf9b990cbb49fca470200d52f6"],"secs":37,"stamp":"8bd5b80150a54cde1adfc3d7027b604d","tree":"1f0259860f8615a801a299e434a61ef10626812f","v":1,"via":"run"} Ci-Attestation: {"at":1793545713,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"5988a515b6c53d16e303281a99b1f4ab78246c3d04a14b396fd0e2a1105aff0f","lane":"cross","parents":["eefd078a9f126edf9b990cbb49fca470200d52f6"],"secs":37,"stamp":"530a6b11f6d30769c0e75e03ee7b96a8","tree":"1f0259860f8615a801a299e434a61ef10626812f","v":1,"via":"run"} Ci-Attestation: {"at":1793545713,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"855b2c105d2a8af7c6f33293570904fe6ce8d57e7edc8b3ad51ebf8cbbaaf74b","lane":"tier2-linux","parents":["eefd078a9f126edf9b990cbb49fca470200d52f6"],"secs":261,"stamp":"11b5a54fd8811043e57b23bb26abef00","tree":"1f0259860f8615a801a299e434a61ef10626812f","v":1,"via":"run"}
vpacher
enabled auto-merge
November 1, 2026 15:09
zackees
approved these changes
Nov 1, 2026
zackees
left a comment
Member
There was a problem hiding this comment.
Coordinator review: LGTM. The test was added in this repo (#1406), not upstream, so changing how it waits is within the rules. Waiting for frames that show the scene (luma above video black) instead of any 10 frames fixes the race at its cause, the assertion thresholds are unchanged, and a run that never draws now fails with a clear message instead of measuring zeros. The 10 s ceiling is reasonable under asan.
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 #3389. Refs #3238.
Why
In the asan job (run 41281819710),
darken_keeps_background_where_transparentfailed attest_darken_transparent.c:325, because the firstrun_scene()measured before the scene was drawn:Luma 0 is below video black: those frames reached the probe encoder as an all-zero NV12 buffer, before the first draw.
run_scene()stopped after 10 encoded frames, drawn or not.What changes
run_scene()measures once 10 such frames arrived, for up to 10 s instead of 3 s, so the slower sanitizer builds under load have room. If they never arrive, the case fails with that message instead of comparing undrawn frames.flakyentry of the test leaves the sanitizer known list.No assertion is removed, and the measured values of drawn frames do not change.
Commits
Tests
The early read did not reproduce on a local build box with 24 cores: the asan build of master under load (12 and 20 runs at a time, other cores busy) passed 143 of 144 runs, and the one failure was
obs_startupfailing (obs_init_hotkeys) with 20 X servers at once, not the measurement. GREEN in the same setup measured the same values in every run that started (normal180.0/71.0,darken180.0/71.0). The next asan nightlies show whether the flake is gone.Tier 2 passes in the local gate. Local gate, stamped head 7f10d77: 4 min 21 s (lint 38 s, rust-test 81 s, cross 37 s, tier2-linux 261 s).
Checklist
master🤖 Generated with Claude Code