Repository navigation
test(cmocka): test_dock_proportions waits for the layout to settle (#3366) - #3436
Merged
Merged
Conversation
…3366) Drop its flaky entry from the sanitizer known list. The test waits a fixed 50 ms after each resize for Qt's layout and the queued DockProportions::Update(). The sanitizer harness runs it with ASAN_OPTIONS=...:fast_unwind_on_malloc=0, which makes every allocation unwind the slow way: the test takes 12.2 s instead of 3.0 s, and 50 ms ends before the shares are put back. Started that way it fails every time, as in the asan job: before: 709 221 252 197 197 narrow: 150 150 150 150 150 after: 315 315 316 315 315 dock 0: 44.9% of the row before, 19.9% after (:104, and :244) Fails: test_dock_proportions with ASAN_OPTIONS=fast_unwind_on_malloc=0 in the asan build, 4/4 (and 32/32 through the harness); passes 4/4 without it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ttle (#3366) Every fixed 50 ms wait after a resize becomes settle(): it returns once the geometry of every window and dock stayed the same over three event-loop passes of 20 ms in a row, at most 3 s. The waits inside the drag loops (10 ms per step) are the scenario and stay. No assertion changes. In the asan build with ASAN_OPTIONS=fast_unwind_on_malloc=0: 0/8 failed (was 4/4), 16.8 s per run; through the sanitizer harness pinned to 4 cores with load: 0/32 failed (was 32/32). Without the option a run takes 4.2 s instead of 3.0 s. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=88fe61f026c68cc866bf0e1c74360ae4b355bf23 secs=268 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a Ci-Attestation: {"at":1793550279,"gate":"rust/all/fmt","host":"linux-x86_64","key":"b8c58afbecd2a13c38472eaf5cf04798e9ed860d0b8c3e0619d3e0b8a343aa14","lane":"lint","parents":["19fadff67018e8f637cb6b37a8c3c42ddc92dbd8"],"secs":40,"stamp":"5161fcd7f03df8010aadfcad21f98bcc","tree":"88fe61f026c68cc866bf0e1c74360ae4b355bf23","v":1,"via":"run"} Ci-Attestation: {"at":1793550279,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"b8c58afbecd2a13c38472eaf5cf04798e9ed860d0b8c3e0619d3e0b8a343aa14","lane":"lint","parents":["19fadff67018e8f637cb6b37a8c3c42ddc92dbd8"],"secs":40,"stamp":"b1df1a18e1fba6957d2158050f8b12fe","tree":"88fe61f026c68cc866bf0e1c74360ae4b355bf23","v":1,"via":"run"} Ci-Attestation: {"at":1793550279,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"3bf709f9804243cc8f341638995f34f6245970c99e2b09197e3b278b7c55e68b","lane":"rust-test","parents":["19fadff67018e8f637cb6b37a8c3c42ddc92dbd8"],"secs":81,"stamp":"612ba4d3bcedf6f7682469c555a0d2d3","tree":"88fe61f026c68cc866bf0e1c74360ae4b355bf23","v":1,"via":"run"} Ci-Attestation: {"at":1793550279,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"12a38c7a1cabe8bba52ca1ea8dcf73a11bb213b11866f56da1c705d5122fcca0","lane":"cross","parents":["19fadff67018e8f637cb6b37a8c3c42ddc92dbd8"],"secs":24,"stamp":"f8ca8f31066200dd76be7ef814dea803","tree":"88fe61f026c68cc866bf0e1c74360ae4b355bf23","v":1,"via":"run"} Ci-Attestation: {"at":1793550279,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"12a38c7a1cabe8bba52ca1ea8dcf73a11bb213b11866f56da1c705d5122fcca0","lane":"cross","parents":["19fadff67018e8f637cb6b37a8c3c42ddc92dbd8"],"secs":24,"stamp":"3c2145281a75233f9842be6d55e99af9","tree":"88fe61f026c68cc866bf0e1c74360ae4b355bf23","v":1,"via":"run"} Ci-Attestation: {"at":1793550279,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"12a38c7a1cabe8bba52ca1ea8dcf73a11bb213b11866f56da1c705d5122fcca0","lane":"cross","parents":["19fadff67018e8f637cb6b37a8c3c42ddc92dbd8"],"secs":24,"stamp":"dbc477d31319197ebade79fb8afdee5c","tree":"88fe61f026c68cc866bf0e1c74360ae4b355bf23","v":1,"via":"run"} Ci-Attestation: {"at":1793550279,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"12a38c7a1cabe8bba52ca1ea8dcf73a11bb213b11866f56da1c705d5122fcca0","lane":"cross","parents":["19fadff67018e8f637cb6b37a8c3c42ddc92dbd8"],"secs":24,"stamp":"c5ec91b6e8b71ebbcc183a1ccaeb19c6","tree":"88fe61f026c68cc866bf0e1c74360ae4b355bf23","v":1,"via":"run"} Ci-Attestation: {"at":1793550279,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"9ad8badca50bf6b0361bae68e24b0be9af43a82829d1b52a418b0d1b60ed58b5","lane":"tier2-linux","parents":["19fadff67018e8f637cb6b37a8c3c42ddc92dbd8"],"secs":267,"stamp":"908478e3a7a277cbc6384efbfd5e006c","tree":"88fe61f026c68cc866bf0e1c74360ae4b355bf23","v":1,"via":"run"}
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 #3366. Refs #3238.
Why
In the asan job the docks came back equal after a narrow-then-wide resize (
after: 315 315 316 315 315, attest_dock_proportions.cpp:104and:244). It is not the window manager (the test runs on Qt's offscreen platform) and not a bug inDockProportions: the test waits a fixed 50 ms after each resize for Qt's layout and the queuedDockProportions::Update()that puts the shares back.The sanitizer harness runs every test with
ASAN_OPTIONS=...:fast_unwind_on_malloc=0, so every allocation unwinds its stack the slow way. On a local build box (asan build):ASAN_OPTIONSfast_unwind_on_malloc=0detect_leaks=1onlyThrough the harness itself, pinned to 4 cores with load, it failed 32 of 32 runs. 50 ms ends before the shares are back.
What changes
Every fixed 50 ms wait after a resize becomes
settle(): it returns once the geometry of every window and dock stayed the same over three event-loop passes of 20 ms in a row, at most 3 s. The waits inside the drag loops (10 ms per step) are the scenario and stay. No assertion changes. Theflakyentry of the test leaves the sanitizer known list, and the triage tests that used it as their flaky example usetest_async_delay_audio.Commits
ASAN_OPTIONS=fast_unwind_on_malloc=0in the asan build (4/4, and 32/32 through the harness).settle().Tests
fast_unwind_on_malloc=0The test takes about 1 s longer, as each wait needs three quiet passes. Tier 2 passes in the local gate. Local gate, stamped head b101259: 4 min 29 s (lint 40 s, rust-test 81 s, cross 24 s, tier2-linux 267 s).
Checklist
master🤖 Generated with Claude Code