forked from rosa/hakurei
nix: remove all explicit timeouts
These were useful during development because timing out is often the only indication of failure due to the terrible design of nixos vm test harness. This has become a nuisance however especially when the system is under load, so remove explicit values and fall back to the ludicrously high default. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -26,7 +26,7 @@ def swaymsg(command: str = "", succeed=True, type="command"):
|
||||
|
||||
|
||||
def check_filter(check_offset, name, pname):
|
||||
pid = int(machine.wait_until_succeeds(f"pgrep -U {10000+check_offset} -x {pname}", timeout=60))
|
||||
pid = int(machine.wait_until_succeeds(f"pgrep -U {10000+check_offset} -x {pname}"))
|
||||
hash = machine.succeed(f"sudo -u alice -i XDG_RUNTIME_DIR=/run/user/1000 WAYLAND_DISPLAY=wayland-1 check-sandbox-{name} hash")
|
||||
print(machine.succeed(f"hakurei-test -s {hash} filter {pid}"))
|
||||
|
||||
@@ -47,7 +47,7 @@ check_filter(0, "pdlike", "cat")
|
||||
|
||||
# Check fd leak:
|
||||
swaymsg("exec exec 127</proc/cmdline && hakurei -v exec sleep infinity")
|
||||
pd_identity0_sleep_pid = int(machine.wait_until_succeeds("pgrep -U 10000 -x sleep", timeout=60))
|
||||
pd_identity0_sleep_pid = int(machine.wait_until_succeeds("pgrep -U 10000 -x sleep"))
|
||||
print(machine.succeed(f"hakurei-test fd {pd_identity0_sleep_pid}"))
|
||||
machine.succeed(f"kill -INT {pd_identity0_sleep_pid}")
|
||||
|
||||
@@ -66,7 +66,7 @@ check_offset = 0
|
||||
def check_sandbox(name):
|
||||
global check_offset
|
||||
swaymsg(f"exec script /dev/null -E always -qec check-sandbox-{name}")
|
||||
machine.wait_for_file(f"/var/tmp/.hakurei-check-ok.{check_offset}", timeout=60)
|
||||
machine.wait_for_file(f"/var/tmp/.hakurei-check-ok.{check_offset}")
|
||||
check_filter(check_offset, name, "hakurei-test")
|
||||
check_offset += 1
|
||||
|
||||
@@ -79,7 +79,7 @@ check_sandbox("device")
|
||||
check_sandbox("pdlike")
|
||||
|
||||
# Exit Sway and verify process exit status 0:
|
||||
machine.wait_until_fails("pgrep -x hakurei", timeout=5)
|
||||
machine.wait_until_fails("pgrep -x hakurei")
|
||||
swaymsg("exit", succeed=False)
|
||||
machine.wait_for_file("/tmp/sway-exit-ok")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user