Graphics: harden weston-simple-egl test and Weston overlay helpersDisplay#221
Merged
abbajaj806 merged 2 commits intoqualcomm-linux:mainfrom Dec 4, 2025
Merged
Graphics: harden weston-simple-egl test and Weston overlay helpersDisplay#221abbajaj806 merged 2 commits intoqualcomm-linux:mainfrom
abbajaj806 merged 2 commits intoqualcomm-linux:mainfrom
Conversation
e3766c5 to
acd6342
Compare
Use run_with_timeout with stdbuf -oL -eL so weston-simple-egl output is line-buffered and FPS lines reliably land in weston-simple-egl_run.log. Log weston-simple-egl output into weston-simple-egl_run.log and compute average FPS across all "N frames in M seconds: X fps" lines instead of relying on a single sample. Record min, max and average FPS and include them in the result summary for easier performance debugging. Gate PASS/FAIL primarily on run duration and optional FPS requirement (REQUIRE_FPS), using EXPECT_FPS and FPS_TOL_PCT when FPS gating is enabled. Default REQUIRE_FPS=1 to enable FPS checks by default, while keeping behaviour configurable via the environment. Keep the .res file format unchanged, still emitting a simple "weston-simple-egl PASS/FAIL" line so the existing Runner harness continues to work without changes. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Make the Weston/Wayland overlay helpers more robust for the weston-simple-egl
test and similar graphics workloads.
- Rework overlay_start_weston_drm() to:
- Use /dev/socket/weston as a private XDG_RUNTIME_DIR.
- Create and chmod the runtime dir safely.
- Start Weston with --continue-without-input and an explicit log file.
- Poll for the Wayland socket up to a fixed timeout and return non-zero if
no socket appears.
- Avoid leaving stray Weston processes running when startup fails.
- Add and wire up Weston helpers used by the Graphics suite:
- discover_wayland_socket_anywhere() to locate existing Wayland sockets.
- adopt_wayland_env_from_socket() to set XDG_RUNTIME_DIR and WAYLAND_DISPLAY
based on a discovered socket.
- wayland_connection_ok() to sanity-check Wayland connectivity using
wayland-info when available.
- weston_pick_env_or_start() to prefer existing Weston sessions and only
spawn a new one when needed, with detailed logging and socket dumps.
- Ensure the overlay path plays nicely with the base path by logging the
suggested env exports so manual reproduction is straightforward.
Also fix ShellCheck SC2009 in is_process_running() by:
- Preferring pgrep -x <name> for name-based checks when pgrep is present.
- Falling back to a ps -e | awk pipeline in minimal environments without pgrep.
- Keeping numeric-input behaviour (kill -0 on PID) intact.
- Preserving existing log messages and 0/1 return codes so current callers
continue to work unchanged.
Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
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.
Why this PR