Repository navigation
test(qa): run host QA scenarios on Wayland with an fcitx5 input method - #1957
Merged
Merged
Conversation
Issue lgse#1715 (fcitx5 composing over selected text) could not be reproduced by the X11-only harness, and its Wayland behaviour was untested. Host runs gain two optional parts: - STRATA_QA_DISPLAY=wayland starts a private headless sway instead of Xvfb; the process sends input through Wayland virtual keyboard and pointer devices instead of XTEST. - A header's input_method starts a private fcitx5 with that input method on the run's display and session bus. The input-method-composes-over-selection scenario reproduces lgse#1715 and is skipped in the pinned image, which has no fcitx5. Refs lgse#1715
…encies Record the clamped Wayland pointer position and say that it is the injector's own record, extend CI's release-graph check to the Wayland and xkbcommon crates, note in the skip reason that the selected-stem run fails until lgse#1715 is fixed, and name grim in Wayland screenshot errors. Refs lgse#1715
Collaborator
Author
|
Review follow-up in f287c36:
Validation (pinned container, run one after the other):
Not verified: Wayland host runs ( |
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.
Description
This adds an optional, host-only Wayland mode to the QA harness. It is a tool for reproducing behaviour that only shows up on Wayland, or with an input method, using the harness's scripted input and state checks. It isn't a second place to run the test suite. CI and
./scripts/qa.shstay X11-only in the pinned container, and a Wayland run is never validation evidence.It was written to reproduce #1715, where fcitx5 puts the first key of a composition into a field with selected text as a plain character. The X11-only harness couldn't start an input method or check Wayland, which that issue lists as untested. The findings are on #1715. The bug happens with
GTK_IM_MODULE=fcitxon both X11 and Wayland, and not with GTK's native Wayland IM module.What it adds, for host runs only (
STRATA_QA_HOST=1):STRATA_QA_DISPLAY=waylandruns a private headless sway in place of Xvfb. Sway gets no input devices of its own, no XWayland and a software renderer, and lives in the run's runtime directory. The app runs withGDK_BACKEND=waylandand sends input through a Wayland virtual keyboard (with a US keymap it compiles) and a virtual pointer instead of XTEST. Sway places every window at the top-left corner of the output, as Xvfb does, so target coordinates work unchanged. Screenshots usegrim.input_methodscenario header field (it needssession_bus) starts a private fcitx5 on the run's display and bus. Its profile holds the US keyboard and the named input method.inline_renaming/input-method-composes-over-selectionreproduces fix(input): let fcitx5 compose the first key over selected text #1715 with chewing. Its caret-at-end variant is a control. The scenario carries askipreason because the pinned image has no fcitx5.The X11 path behaves as before; its injector code was only moved behind a backend enum. The new dependencies (
wayland-client,wayland-protocols-misc,wayland-protocols-wlr,xkbcommon) are optional and enabled only by theqafeature.Limitations
I ran the whole suite on the host with
STRATA_QA_DISPLAY=wayland: 559 of 635 runs passed. Expect failures that have nothing to do with the behaviour under test:usare X11-only and fail with a message (10 runs).clipboardcheck reads through a second display connection, and Wayland only gives the clipboard to a client with keyboard focus.foreign_drag_source.py) uses Xlib, so it can't run on Wayland (4 runs).resizecommand (which goes through sway's IPC socket), visual baselines (none exist for the host's GTK), and./scripts/qa-drive.sh, which stays X11 and container-only.mtimechecks use the host's time zone, and baselines are missing for the host's GTK version.Keyboard input, pointer clicks, popover menus, dialogs and input methods worked in the scenarios I checked.
Visual evidence
N/A: this changes the test harness only, with no user-visible change.
How to test
Requires a host with
sway,swaymsg,grim,fcitx5,fcitx5-gtkandfcitx5-chewing.STRATA_QA_HOST=1 STRATA_QA_NAMED=1 STRATA_QA_DISPLAY=wayland cargo test --features qa,invariant-checks --test qa -- --include-ignored --exact input-method-composes-over-selectionSTRATA_QA_DISPLAY=x11."GTK_IM_MODULE":"fcitx"to"wayland"and repeat step 1../scripts/qa.shas usual.Expected result: In steps 1 and 2,
columns-caret-at-endpasses andcolumns-selected-stemfails with the rename field showing阿ㄅ.txtinstead of八.txt, which is bug #1715. In step 3, both runs pass. In step 4, the container run is unchanged and lists the new scenario asSKIPPED.Related issue
Refs #1715 (this does not fix it). The drag-and-drop finding is filed as #1958.