aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test.py
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-07-28 23:38:28 +0900
committerOphestra <cat@gensokyo.uk>2025-07-28 23:39:30 +0900
commitddf48a6c22d4387ff2ca2e45afbcc86fa7d81968 (patch)
tree22a7701de9435edfe8077696ec4357400bb56077 /test/test.py
parenta0f499e30a2f2a43b7a86ad081fc6703d67a6e36 (diff)
app/shim: implement signal handler outcome in Go
This needs to be done from the Go side eventually anyway to integrate the signal forwarding behaviour now supported by the container package. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/test.py')
-rw-r--r--test/test.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test.py b/test/test.py
index 1636164b..9e150399 100644
--- a/test/test.py
+++ b/test/test.py
@@ -181,6 +181,15 @@ interrupt_exit_code = int(machine.succeed("cat /tmp/monitor-exit-code"))
if interrupt_exit_code != 254:
raise Exception(f"unexpected exit code {interrupt_exit_code}")
+# Check shim SIGCONT from unexpected process behaviour:
+swaymsg("exec sh -c 'ne-foot &> /tmp/shim-cont-unexpected-pid'")
+wait_for_window(f"u0_a{aid(0)}@machine")
+machine.succeed("pkill -CONT -f 'hakurei shim'")
+machine.succeed("pkill -INT -f 'hakurei -v app '")
+machine.wait_until_fails("pgrep foot", timeout=5)
+machine.wait_for_file("/tmp/shim-cont-unexpected-pid")
+print(machine.succeed('grep "shim: got SIGCONT from unexpected process$" /tmp/shim-cont-unexpected-pid'))
+
# Start app (foot) with Wayland enablement:
swaymsg("exec ne-foot")
wait_for_window(f"u0_a{aid(0)}@machine")