aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-13 22:01:16 +0900
committerOphestra <cat@gensokyo.uk>2025-02-13 22:01:16 +0900
commit318df0f7e1f743c7b4ebc979c77ec34d68d0f2e3 (patch)
treeb2451710a7b0807ffeb3f1b1180aa6e3e6de8905
parent58eb8f971ddc22941d6d32dd28e050f8c6f68048 (diff)
nix: test syscall filter
Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--test.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/test.nix b/test.nix
index 85c4da9c..874e6199 100644
--- a/test.nix
+++ b/test.nix
@@ -147,6 +147,18 @@ nixosTest {
pulse = false;
};
}
+ {
+ name = "strace-failure";
+ verbose = true;
+ share = pkgs.strace;
+ command = "strace true";
+ capability = {
+ wayland = false;
+ x11 = false;
+ dbus = false;
+ pulse = false;
+ };
+ }
];
};
@@ -310,6 +322,9 @@ nixosTest {
machine.send_chars("exit\n")
machine.wait_until_fails("pgrep alacritty")
+ # Test syscall filter:
+ print(machine.fail("sudo -u alice -i XDG_RUNTIME_DIR=/run/user/1000 strace-failure"))
+
# Exit Sway and verify process exit status 0:
swaymsg("exit", succeed=False)
machine.wait_until_fails("pgrep -x sway")