Skip to content

test(cmocka): test_dock_proportions waits for the layout to settle (#3366) - #3436

Merged
vpacher merged 2 commits into
masterfrom
fix/3366-dock-proportions
Nov 1, 2026
Merged

vpacher merged 2 commits into
masterfrom
fix/3366-dock-proportions

Conversation

@vpacher

@vpacher vpacher commented Nov 1, 2026

Copy link
Copy Markdown
Member

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, at test_dock_proportions.cpp:104 and :244). It is not the window manager (the test runs on Qt's offscreen platform) and not a bug in DockProportions: the test waits a fixed 50 ms after each resize for Qt's layout and the queued DockProportions::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_OPTIONS Failed Per run
none 0/4 3.0 s
fast_unwind_on_malloc=0 4/4 12.2 s
detect_leaks=1 only 0/4 3.0 s

Through 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. The flaky entry of the test leaves the sanitizer known list, and the triage tests that used it as their flaky example use test_async_delay_audio.

Commits

  • RED 19fadff: drops the known-list entry. Fails: the test with ASAN_OPTIONS=fast_unwind_on_malloc=0 in the asan build (4/4, and 32/32 through the harness).
  • GREEN b101259: settle().

Tests

RED GREEN
fast_unwind_on_malloc=0 4/4 failed 0/8 failed (16.8 s per run)
through the harness, 4 cores and load 32/32 failed 0/32 failed
no options 0/4 failed, 3.0 s 0/4 failed, 4.2 s

The 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

🤖 Generated with Claude Code

vpacher and others added 2 commits November 1, 2026 17:20
…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"}
@vpacher
vpacher requested a review from zackees as a code owner November 1, 2026 16:25
@vpacher
vpacher enabled auto-merge November 1, 2026 16:25
@vpacher
vpacher added this pull request to the merge queue Nov 1, 2026
Merged via the queue into master with commit 3f39ef6 Nov 1, 2026
36 checks passed
@vpacher
vpacher deleted the fix/3366-dock-proportions branch November 1, 2026 16:49
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.

test: test_dock_proportions finds the docks equal after a resize in the asan job

1 participant