| Ticket UUID: | e80bd792478731301a47c783fa64db62127ee65 | |||
| Title: | Wayland branch: tests fail on embedding, pointer warping and screen positions, which Wayland does not support | |||
| Type: | Bug | Version: | wayland | |
| Submitter: | serhiy.storchaka | Created on: | 2026-10-15 10:57:37 | |
| Subsystem: | (unused) | Assigned To: | kevin_walzer | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Open | Last Modified: | 2026-11-10 01:38:21 | |
| Resolution: | Accepted | Closed By: | nobody | |
| Closed on: | 2026-10-17 23:55:02 | |||
| Description: |
About 140 tests fail on Wayland because they need features that Wayland clients do not have: window embedding (-use, -container; safe Tk always embeds), pointer warping (event generate -warp), and the screen positions of toplevels (wm geometry +X+Y, winfo containing, winfo rootx). Also the colormap tests and the combobox tests which assume a listbox popdown (the Wayland popdown is a menu, as on Aqua) fail. They hide the real failures in unixEmbed.test, unixWm.test, raise.test, safe.test, event.test, bind.test, winfo.test, wm.test, tk.test and ttk/combobox.test. Proposed fix in branch wayland-test-constraints: new test constraints embedding, pointerWarp and screenCoords (false on Wayland), and !wayland for the colormap and combobox tests. | |||
| User Comments: |
kevin_walzer added on 2026-11-10 01:38:21:
Merged the wayland-testwrapper branch. serhiy.storchaka added on 2026-11-08 21:44:34: Branch wayland-testwrapper enables the testwrapper test command on Wayland, where the wrapper of a toplevel is the toplevel itself. 18 more tests run under GNOME and sway (13 in focus.test, 5 in unixWm.test). The tests which read X properties or depend on the X11 wrapper, the X input focus, embedding or screen coordinates are constrained with x11 or screenCoords. testmenubar is not enabled, because TkUnixSetMenubar does nothing on Wayland, and testxfocus would need an emulation of the X input focus. kevin_walzer added on 2026-10-29 00:59:21: Serhiy, I have merged wayland-wm-features, wayland-present-size, and pulled in the fixes from scale-command-redraw. On my system, this results in 48 test failures in the main test suite, and 6 in the ttk suite. The Github CI runner for Wayland is now operational and typically matches the local test results I get. If there are any remaining test fixes that can be merged, please feel free to do so. I would like to begin really focusing on the persistent failures and identifying fixes for them so we can move toward proposing a TIP for Wayland. serhiy.storchaka added on 2026-10-28 19:55:32: Kevin, did you not forget about branch wayland-wm-features? serhiy.storchaka added on 2026-10-28 19:51:58: Branch wayland-present-resize fixes a toplevel getting its old size back from the compositor: when Tk resizes a mapped toplevel and nothing needs to be redrawn, the surface is not committed, so the new size is applied only at the next commit, and sway can send the old size back, e.g. when another toplevel is mapped. With the current tip of wayland ([a896cbeee7]) under headless sway, growing . by packing a frame and then mapping another toplevel keeps the old size in 5 of 10 tries; with the branch merged, in none. scale-23.1 showed it earlier, but now it fails anyway because of the missing [ea459e12c2] fix in wayland/tkWaylandScale.c. The tip of wayland is merged into the branch ([8f7b51473d]), so it now merges without conflicts. kevin_walzer added on 2026-10-22 16:50:03: After merging wayland_test_constraints, and running under headless mutter with this invocation: ./tktest ../tests/all.tcl -singleproc 1 -verbose bpe | tee out-classic.txt ./tktest ../tests/ttk/all.tcl -singleproc 1 -verbose bpe | tee out-ttk.txt I get these results: Tests ended at 2026-10-22 12:40:33 EDT all.tcl: Total 9774 Passed 8775 Skipped 967 Failed 32 Sourced 87 Test Files. Files with failing tests: bind.test listbox.test panedwindow.test scale.test systray.test textDisp.test unixWm.test wm.test Number of tests skipped for each constraint: 12 altDisplay 29 aqua 9 aquaOrWin32 1 cliboardManagerPresent 16 colorsFree 21 defaultPseudocolor8 79 embedding 4 emptyTest 126 fonts 1 have32bitsVisual 2 haveDISPLAY 5 haveOtherVisual 1 havePseudocolorVisual 3 haveTimesFamilyFont 8 knownBug 1 libnotify 3 memory 9 needsICU 96 nonPortable 62 notWayland 1 pixelProbe notWayland" 18 pointerWarp 5 pseudocolor8 39 screenCoords 21 testmenubar 11 testmetrics 1 testmovemouse 3 testpressbutton 54 testsend 52 testwrapper 6 testxfocus 1 unix !withXft 1 unix && !zoomedState 1 userInteraction 114 win 2 win32 149 x11 Tests ended at 2026-10-22 12:40:49 EDT all.tcl: Total 2063 Passed 2035 Skipped 22 Failed 6 Sourced 19 Test Files. Files with failing tests: nodecache.test This is certainly progress. The key to actually avoiding hangs appears to be using -singleproc 1. I know there are other fixes that are still pending, but I am encouraged. Serhiy, thank you once again for your assistance and support. Once the outstanding fixes are merged, we can see where we stand and perhaps think about setting up wayland as part of the Github CI. serhiy.storchaka added on 2026-10-22 12:12:11: I ran the whole test suite on [f53ab0541e] under headless sway and GNOME Shell, each test file in a separate process with a timeout of 300 seconds (-file X.test -singleproc 1 -verbose tbe), so that a hang only stops one file. Under sway nothing hung and 26 tests failed; under GNOME Shell 48 failed and focusTcl.test hung once, before its first test, but not in 8 later runs. The failures:
kevin_walzer added on 2026-10-21 20:05:07: After merging trunk with updates to several tests and updating to the tip of tclsh9.1, I still have inexplicable hangs in the Tk test suite when running "make test" or "tclsh9.1 all.tcl." There does not seem to be any clear pattern here, and I still do not have a handle on how many tests are failing, which failures should be constrained because they are on wayland, and which are authentic errors requiring further investigation. It seems premature to try and run the Wayland test suite on Github CI because we still have filtered out the noise. kevin_walzer added on 2026-10-20 14:40:14: Yes, please handle the merge. serhiy.storchaka added on 2026-10-20 13:11:57: The constraint branch is still needed for the tests which cannot pass on Wayland (embedding, pointer warping, etc). tests-min-width only makes the constraints for the minimum width unnecessary. When tests-min-width is merged in main and main in wayland, take the tests from main in conflicts. I can do this merge. kevin_walzer added on 2026-10-20 12:19:25: How does the new wayland_test_constraints branch interact with tests-min-width? Is the constraint branch no longer needed? Or how should I handle these merges? serhiy.storchaka added on 2026-10-20 09:22:04: Most tests constrained for the 180 pixel minimum width with client-side decorations do not need the constraints: branch tests-min-width (based on main, see [deca13e833]) makes the windows wider, or uses a frame which is not resized with the toplevel. The same tests failed on Windows with high scaling. With it frame-15.14, grid-16.11, 16.13–16.16, 16.18, 18.1, 18.2, pack-19.2, text-10.38, 14.19, 14.20, textDisp-4.5, 4.6, 22.5, 24.5, 24.16, unixWm-4.*, 6.3, 40.2, 41.4, 44.2, 44.3, 44.6, 48.1 and wm-geometry-2.1 pass under GNOME Shell and sway. After merging main in the wayland branch, their notWayland constraints can be removed. Only unixWm-44.5, which tests that a negative width becomes 1, has to stay constrained. serhiy.storchaka added on 2026-10-20 05:12:48: In [149bc08962] -constraints was added to old-style tests (textDisp-4.5, 4.6, 22.5, 24.5, 24.16; unixWm-4.*, 6.3, 40.2, 41.3, 41.4, 44.3, 48.1). textDisp.test and unixWm.test stopped at the first of them with bad option on all platforms, so about 600 tests were not run. In old-style tests (test name description constraints body result) the constraints are the third positional argument, not an option: -constraints can only be used in tests where all arguments are options (-body, -result, etc). A constraint with ! makes the whole constraints an expression, so && is needed: {unix && !wayland}. With notWayland it is not needed: a plain list such as {unix notWayland} requires all constraints. Fixed in [b7542de88f]: the constraints of old-style tests are positional again, and notWayland is used without && everywhere (also in ttk/combobox.test). kevin_walzer added on 2026-10-19 22:30:19: Tests seem to hang quite a bit - not sure why. kevin_walzer added on 2026-10-19 21:46:11: Re-opening this ticket with new branch, wayland_test_constraints, that adds constraints for tests that fail because of libdecor size requirements with some compositors; also, replacing !wayland constraint with a proper notWayland constraint to avoid conflicts with other constraints. kevin_walzer added on 2026-10-17 23:55:02: Accepting, thank you. serhiy.storchaka added on 2026-10-15 17:26:03: Tcltest treats a constraint list which contains ! as an expression, so {unix !wayland} is an invalid expression and the test was skipped everywhere, also on X11. Fixed by writing such lists as {unix && !wayland}: the 8 tests constrained here, and the same error in 17 tests which were already in the wayland branch (frame-2.15, 2.16, 3.9, 3.10, 3.12–3.15, 3.17, send-8.11–8.17, image-6.1). They run on X11 again. serhiy.storchaka added on 2026-10-15 15:26:10: Added the testxfocus constraint to focus-1.19 (another application cannot take the focus away on Wayland, and there is no testxfocus command), and pointerWarp to textTag-18.1. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki