From 8a8a7463bbbb8edf3956e1b7a94abc0e9e733669 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 15 Nov 2026 01:12:34 +0900 Subject: cmd/hakurei/testsuite: use wayland-utils This is simpler and more reliable than verifying security context via a grim error message. Signed-off-by: Ophestra --- cmd/hakurei/testsuite/main.go | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'cmd') diff --git a/cmd/hakurei/testsuite/main.go b/cmd/hakurei/testsuite/main.go index b2348ac6..9e7455a5 100644 --- a/cmd/hakurei/testsuite/main.go +++ b/cmd/hakurei/testsuite/main.go @@ -512,13 +512,14 @@ func main() { "wayland-security-context", "wayland security-context-v1", false, false, false, 0, func(c *hst.Config) { c.Enablements = new(hst.EWayland) - c.Container.Path = prefix.Append("bin", "grim") - c.Container.Args = []string{"grim"} + c.Container.Path = prefix.Append("bin", "wayland-info") + c.Container.Args = []string{"wayland-info"} }, nil, func(output string) bool { - return output == "warning: zxdg_output_manager_v1 isn't available, "+ - "guessing the output layout\r\n"+ - "compositor doesn't support wlr-screencopy-unstable-v1\r\n" - }, hst.ExitFailure, + return !strings.Contains( + output, + "zwlr_screencopy_manager_v1", + ) + }, 0, ) checkHakurei( @@ -527,9 +528,14 @@ func main() { false, false, true, 0, func(c *hst.Config) { c.Enablements = new(hst.EWayland) c.DirectWayland = true - c.Container.Path = prefix.Append("bin", "grim") - c.Container.Args = []string{"grim", "/dev/null"} - }, nil, nil, 0, + c.Container.Path = prefix.Append("bin", "wayland-info") + c.Container.Args = []string{"wayland-info"} + }, nil, func(output string) bool { + return strings.Contains( + output, + "\ninterface: 'zwlr_screencopy_manager_v1',", + ) + }, 0, ) // this client lacks attached identification -- cgit v1.3.1