diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-15 10:45:27 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-15 10:45:27 +0900 |
| commit | 6ae02e72faa0fb5d7b26ced6d7cad392cfdd0a56 (patch) | |
| tree | 2953c61a4f28dcb869bc3152c3fe10f812249523 /test.nix | |
| parent | 989fb5395f49b24b2096b331392cfb5770cf3d47 (diff) | |
nix: test direct_wayland behaviour
This should never be used outside tests unless you absolutely know what you're doing or are using GNOME.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test.nix')
| -rw-r--r-- | test.nix | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -81,7 +81,7 @@ nixosTest { mkdir -p ~/.config/sway (sed s/Mod4/Mod1/ /etc/sway/config && echo 'output * bg ${pkgs.nixos-artwork.wallpapers.simple-light-gray.gnomeFilePath} fill' && - echo 'output Virtual-1 res 1280x768') > ~/.config/sway/config + echo 'output Virtual-1 res 1680x1050') > ~/.config/sway/config sway --validate systemd-cat --identifier=sway sway && touch /tmp/sway-exit-ok @@ -149,6 +149,18 @@ nixosTest { }; } { + name = "da-foot"; + verbose = true; + insecureWayland = true; + share = pkgs.foot; + packages = [ pkgs.foot ]; + command = "foot"; + capability = { + dbus = false; + pulse = false; + }; + } + { name = "strace-failure"; verbose = true; share = pkgs.strace; @@ -323,6 +335,20 @@ nixosTest { machine.send_chars("exit\n") machine.wait_until_fails("pgrep alacritty") + # Start app (foot) with direct Wayland access: + swaymsg("exec da-foot") + wait_for_window("u0_a4@machine") + machine.send_chars("clear; wayland-info && touch /tmp/success-direct\n") + machine.wait_for_file("/tmp/fortify.1000/tmpdir/4/success-direct") + collect_state_ui("foot_direct") + check_state("da-foot", 1) + # Verify acl on XDG_RUNTIME_DIR: + print(machine.succeed("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 1000004")) + machine.send_chars("exit\n") + machine.wait_until_fails("pgrep foot") + # Verify acl cleanup on XDG_RUNTIME_DIR: + machine.wait_until_fails("getfacl --absolute-names --omit-header --numeric /run/user/1000 | grep 1000004") + # Test syscall filter: print(machine.fail("sudo -u alice -i XDG_RUNTIME_DIR=/run/user/1000 strace-failure")) |
