From b66cfd9a634dd554fc4b1558198e33ab40e6f9d7 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 25 Mar 2025 04:37:58 +0900 Subject: [PATCH] test: check revert type selection Signed-off-by: Ophestra --- test/test.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test/test.py b/test/test.py index e53d592..b6f965c 100644 --- a/test/test.py +++ b/test/test.py @@ -127,8 +127,8 @@ def tmpdir_path(offset, name): # Start fortify permissive defaults outside Wayland session: -print(machine.succeed("sudo -u alice -i fortify -v run -a 0 touch /tmp/success-bare")) -machine.wait_for_file("/tmp/fortify.1000/tmpdir/0/success-bare", timeout=5) +print(machine.succeed("sudo -u alice -i fortify -v run -a 0 touch /tmp/pd-bare-ok")) +machine.wait_for_file("/tmp/fortify.1000/tmpdir/0/pd-bare-ok", timeout=5) # Verify silent output permissive defaults: output = machine.succeed("sudo -u alice -i fortify run -a 0 true &>/dev/stdout") @@ -164,6 +164,21 @@ machine.wait_for_file("/tmp/dbus-ok", timeout=15) collect_state_ui("dbus_notify_exited") machine.succeed("pkill -9 mako") +# Check revert type selection: +fortify("-v run --wayland -X --dbus --pulse -u p0 foot && touch /tmp/p0-exit-ok") +wait_for_window("p0@machine") +print(machine.succeed("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 1000000")) +fortify("-v run --wayland -X --dbus --pulse -u p1 foot && touch /tmp/p1-exit-ok") +wait_for_window("p1@machine") +print(machine.succeed("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 1000000")) +machine.send_chars("exit\n") +machine.wait_for_file("/tmp/p1-exit-ok", timeout=10) +# Verify acl is kept alive: +print(machine.succeed("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 1000000")) +machine.send_chars("exit\n") +machine.wait_for_file("/tmp/p0-exit-ok", timeout=10) +machine.fail("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 1000000") + # Start app (foot) with Wayland enablement: swaymsg("exec ne-foot") wait_for_window(f"u0_a{aid(0)}@machine")