From 6c5d260607522a504d76781c518287e512b7179c Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 15 Dec 2025 20:14:39 +0900 Subject: [PATCH] test: check shim private dir cleanup This asserts that no shim private dir was left behind after all containers terminate. Signed-off-by: Ophestra --- test/sandbox/test.py | 1 + test/test.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/test/sandbox/test.py b/test/sandbox/test.py index 6231134..8fb1873 100644 --- a/test/sandbox/test.py +++ b/test/sandbox/test.py @@ -84,3 +84,4 @@ machine.wait_for_file("/tmp/sway-exit-ok") # Print hakurei runDir contents: print(machine.fail("ls /run/user/1000/hakurei")) +machine.succeed("find /tmp -maxdepth 1 -type d -name '.hakurei-shim-*' -print -exec false '{}' +") diff --git a/test/test.py b/test/test.py index 194c2d3..609bfa1 100644 --- a/test/test.py +++ b/test/test.py @@ -226,8 +226,10 @@ machine.send_chars("clear; pactl info && touch /var/tmp/pulse-ok\n") machine.wait_for_file("/var/tmp/pulse-ok", timeout=15) collect_state_ui("pulse_wayland") check_state("pa-foot", {"wayland": True, "pipewire": True}) +machine.fail("find /tmp -maxdepth 1 -type d -name '.hakurei-shim-*' -print -exec false '{}' +") machine.send_chars("exit\n") machine.wait_until_fails("pgrep foot", timeout=5) +machine.succeed("find /tmp -maxdepth 1 -type d -name '.hakurei-shim-*' -print -exec false '{}' +") # Test PipeWire SecurityContext: machine.succeed("sudo -u alice -i XDG_RUNTIME_DIR=/run/user/1000 hakurei -v run --pulse pactl info") machine.fail("sudo -u alice -i XDG_RUNTIME_DIR=/run/user/1000 hakurei -v run --pulse pactl set-sink-mute @DEFAULT_SINK@ toggle") @@ -288,6 +290,7 @@ print(machine.succeed("find /tmp/hakurei.0 " + "-path '/tmp/hakurei.0/tmpdir/*/*' -prune -o " + "-print")) print(machine.succeed("find /run/user/1000/hakurei")) +machine.succeed("find /tmp -maxdepth 1 -type d -name '.hakurei-shim-*' -print -exec false '{}' +") # Verify go test status: machine.wait_for_file("/tmp/hakurei-test-done")