diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-15 20:14:39 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-15 20:30:19 +0900 |
| commit | 767f1844d222bdd5afc99868df7b5b42e7e2fad4 (patch) | |
| tree | 28f98342f4b21ba945c07aad8e8150834508aec4 | |
| parent | 54610aaddcc01e335c34087bc0c3bc1de6d23cf8 (diff) | |
test: check shim private dir cleanup
This asserts that no shim private dir was left behind after all containers terminate.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | test/sandbox/test.py | 2 | ||||
| -rw-r--r-- | test/test.py | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/sandbox/test.py b/test/sandbox/test.py index 62311342..c1191483 100644 --- a/test/sandbox/test.py +++ b/test/sandbox/test.py @@ -79,8 +79,10 @@ check_sandbox("device") check_sandbox("pdlike") # Exit Sway and verify process exit status 0: +machine.wait_until_fails("pgrep -x hakurei", timeout=5) swaymsg("exit", succeed=False) 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 194c2d3a..485e475f 100644 --- a/test/test.py +++ b/test/test.py @@ -226,8 +226,11 @@ 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.wait_until_fails("pgrep -x hakurei", 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") @@ -279,6 +282,7 @@ machine.send_key("ctrl-c") machine.wait_until_fails("pgrep foot", timeout=5) # Exit Sway and verify process exit status 0: +machine.wait_until_fails("pgrep -x hakurei", timeout=5) swaymsg("exit", succeed=False) machine.wait_for_file("/tmp/sway-exit-ok") @@ -288,6 +292,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") |
