From f09133a224fabf2d16c7790654e39068cb59450f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 22 Sep 2025 21:56:29 +0900 Subject: test: check init lingering timeout behaviour This checks init timeout on lingering process after initial process termination. Signed-off-by: Ophestra --- test/test.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/test.py') diff --git a/test/test.py b/test/test.py index 537b4b16..ae4dfdac 100644 --- a/test/test.py +++ b/test/test.py @@ -103,6 +103,15 @@ if denyOutput != "hsu: uid 1001 is not in the hsurc file\n": if denyOutputVerbose != "hsu: uid 1001 is not in the hsurc file\nhakurei: *cannot obtain uid from setuid wrapper: current user is not in the hsurc file\n": raise Exception(f"unexpected deny verbose output:\n{denyOutputVerbose}") +# Verify timeout behaviour: +machine.succeed('sudo -u alice -i hakurei-check-linger-timeout > /var/tmp/linger-stdout 2> /var/tmp/linger-stderr') +linger_stdout = machine.succeed("cat /var/tmp/linger-stdout") +linger_stderr = machine.succeed("cat /var/tmp/linger-stderr") +if linger_stdout != "": + raise Exception(f"unexpected stdout: {linger_stdout}") +if linger_stderr != "init: timeout exceeded waiting for lingering processes\n": + raise Exception(f"unexpected stderr: {linger_stderr}") + check_offset = 0 -- cgit v1.3.1