Skip to content

Commit 5574274

Browse files
committed
functestlib: improve weston overlay helpers and process detection
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 <[email protected]>
1 parent f63817a commit 5574274

File tree

1 file changed

+247
-38
lines changed

1 file changed

+247
-38
lines changed

0 commit comments

Comments
 (0)