Wip protocol tests - #1270
Conversation
There was a problem hiding this comment.
Sorry @zorowk, your pull request is larger than the review limit of 150000 diff characters
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zorowk The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideIntroduces a comprehensive protocol test framework plus multiple desktop-level protocol tests, refactors Treeland initialization into reusable helpers, and fixes several input, wallpaper, keyboard, screensaver, shortcut, and capture behaviors to support deterministic testing and production stability. Sequence diagram for updated wallpaper ready and mapping behaviorsequenceDiagram
participant Client
participant WSurface
participant WallpaperIface as TreelandWallpaperSurfaceInterfaceV1Private
Client->>WSurface: commit(buffer)
WSurface->>WallpaperIface: ready(Resource)
alt WSurface.mapped or bufferSize not empty
WallpaperIface->>WSurface: map()
WallpaperIface--)Client: ready()
else wait for commit
WSurface->>WallpaperIface: commit(quint32)
WallpaperIface->>WSurface: map()
WallpaperIface--)Client: ready()
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
fcf38f1 to
cfc759f
Compare
There was a problem hiding this comment.
Sorry @zorowk, your pull request is larger than the review limit of 150000 diff characters
fcb8884 to
71260fc
Compare
…ramework shared compositor initialization and the protocol-test framework; - Move shared QPA and minimal test-server initialization into libtreeland. - Provide an isolated headless protocol-test fixture with generated C Wayland clients and a DDE shell example organized as named cases. Make future protocol coverage additions consistent while preserving a real C Wayland client boundary.
Add client-side protocol test coverage for Treeland private Wayland interfaces. - Register 14 new protocol-test targets in the protocol test build. - Add C clients, setup fixtures, and test headers for app-id, capture, output, wallpaper, window-management, and related private protocols. Exercise protocol requests, events, and error behavior against the headless server fixture.
Strengthen protocol tests with real output setup and observable server-side effects. - Create a headless output for DDE overlap checks and assert DDE shell-surface state changes. - Bind the wallpaper notifier client interface and verify add/remove broadcasts. Ensure these tests validate protocol behavior instead of treating missing dependencies or manually omitted interfaces as successful coverage.
Protocol tests need real headless outputs and mapped xdg toplevels for server-side surface semantics. - Share headless output and wl_shm fixture support across protocol tests - Generate scanner-based xdg-shell client helpers on demand - Require the foreign toplevel test to use a configured, buffer-mapped xdg window Avoid transport-only coverage where output or window-dependent protocol paths silently no-op. Only protocol test framework and affected test fixtures; no production protocol behavior.
The working tree contains only the desktop protocol fixture and its consumers. - add production desktop fixture - validate foreign handles against SurfaceWrapper - add DDE SurfaceWrapper propagation test Protocol tests must observe production business effects. All current worktree changes are protocol-test framework and test sources.
Desktop protocol tests run against the production Helper and its full registry. - add a mapped xdg personalization integration test - make the client registry retain stable names for all production globals - synchronize desktop clients with a headless output and fix foreign test encapsulation Verify protocol requests affect real compositor window state without relying on private setters. Only protocol test framework and protocol test sources are included.
The protocol suite needs observable production outcomes for desktop-dependent private protocols. - Add desktop tests for screensaver idle inhibition, shortcut activation, and show-desktop visibility. - Generate and link extra upstream client protocols for desktop tests. - Initialize shortcut state for the already-active global session. Exercise real mapped windows, input, idle state, and workspace visibility instead of protocol-local state alone. Exclude tests/protocols/specifications and do not add rendered capture or wallpaper coverage.
Protocol tests need a reusable production scene with a client buffer whose pixels can be observed. - Add a desktop rendered-output fixture that maps a solid-colour xdg client buffer. - Read the production surface texture through WTextureCapturer and assert its pixels. - Extend the shared xdg test client to map solid ARGB buffers directly after the first configure. Provide a verified rendering prerequisite for capture and output-facing protocol tests. Exclude tests/protocols/specifications and do not yet implement capture selector or frame copy coverage.
Private Wayland protocol tests need to observe production desktop behavior rather than only protocol resources and manually emitted events. - add capture, wallpaper, and virtual-output desktop protocol clients - drive desktop fixture readiness from output and DConfig production state - map buffered wallpaper surfaces before emitting ready - expose a test-only capture selector bridge for the production selection path The tests now exercise mapped surfaces, rendered capture pixels, wallpaper binding, and output copy/restore semantics through production objects. Commit only the listed source and test files; exclude tests/protocols/specifications and all other changes.
Desktop protocol integration coverage now exercises prelaunch splash, app-id resolution, DDE lockscreen, picker, and multitask flows. - add production desktop tests for splash, app-id resolver, DDE lockscreen, picker, and multitask behavior - add pending-xdg test client support for resolver sequencing - fix DDE picker setup to subscribe before the first pick request and centralize window selection Ensure protocol requests produce observable compositor business results through real desktop objects.
Adds desktop integration tests for the input manager, keyboard state notification, Wine window state, and Wine window management private protocols. - register four private protocol integration test targets - exercise input manager and Wine window protocol request and event paths - exercise keyboard state notification with a virtual keyboard and track runtime keyboard changes Extend protocol coverage beyond resource creation to observable compositor behavior.
扩展输入、桌面、foreign-toplevel 与个性化协议的真实生产链路测试,并补充桌面测试运行环境支持。 - 增加 input-manager 的 settings/apply、capability 与可选 uinput 热插拔测试 - 补充 foreign-toplevel 对真实窗口状态、焦点和图标区域的断言 - 补齐 personalization 配置回读与测试后的状态恢复 - 支持 desktop fixture 的预检、跳过和可覆写 backend,并修复 WSeat 分组键盘销毁顺序 让协议请求覆盖对应可观察的生产状态,同时避免测试遗留配置或依赖不稳定的设备环境。 不包含协议规范目录和生成的构建产物。
Desktop protocol coverage must observe existing compositor lifecycles without introducing production-only test hooks or changing ownership of keyboard, idle, and wallpaper state. - remove the input-manager capability provider and reduce the default no-device test to manager binding - restore keyboard-state notification to keyboard-group semantics and remove virtual-keyboard coverage from the default target - run the screensaver protocol fixture under Helper so inhibit requests update the real idle notifier - remove wallpaper-shell mapping from ready while retaining its committed-buffer and next-commit readiness timing - narrow wallpaper desktop assertions to manager, shell surface, output, and workspace association Keep protocol assertions aligned with real desktop and xdg-shell lifecycles while avoiding test-driven production behavior. Amend only the currently staged 16 files; leave all unstaged and untracked changes untouched.
protocol-tests - add the protocol-test specification index and per-protocol contracts - record fixture boundaries, observable production results, and coverage gaps keep protocol coverage expectations reviewable alongside the test suite
desktop protocol test runner - load build-tree lockscreen and multitask plugins through CTest-provided fixture configuration - wait for user configuration before the wallpaper desktop client updates production wallpaper state - document fixture readiness and plugin-loading boundaries ensure desktop assertions observe the required production plugin and wallpaper configuration state
protocol test source headers - add the 2026 UnionTech copyright notice to protocol fixture, framework, and test client sources - add the same notice to treeland initialization sources make ownership information consistent across the protocol test implementation
71260fc to
834a359
Compare
C++ protocol-test sources include wlr_all.h for the required extern C linkage. - Add wlr/types/wlr_shm.h to the unified wlroots C++ header. Make wlr_shm_create visible with C linkage to C++ callers using the unified header.
834a359 to
8175da9
Compare
|
TAG Bot New tag: 0.8.18 |
P:协议/资源级;验证请求、事件和协议错误。I:生产集成级;验证生产模块的状态、回调或生命周期。E:端到端业务级;验证真实生产对象产生了业务结果。V:渲染/像素级;在E基础上读取渲染结果或像素。(只有capture, color等在使用)已注册并有测试目录的 19 个当前协议:XML 共 185 条 request,其中测试客户端直接
调用了 165 条(89.2%)。
去掉 48 条
destroy生命周期 request 后,剩余 137 条工厂、配置和业务 request 中有120 条(87.6%) 被直接调用。
19 个协议中 16 个(84.2%) 至少有一条 E 级生产业务链路;仅 DDM、output-manager
color-control、wallpaper-color 仍停留在 I/P 层。
详细的基本覆盖情况阅读 tests/protocols/specifications/README.md