test: check init lingering timeout behaviour
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (race detector) (push) Successful in 41s
Test / Sandbox (push) Successful in 40s
Test / Hpkg (push) Successful in 41s
Test / Hakurei (race detector) (push) Successful in 4m7s
Test / Hakurei (push) Successful in 2m35s
Test / Flake checks (push) Successful in 1m35s
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (race detector) (push) Successful in 41s
Test / Sandbox (push) Successful in 40s
Test / Hpkg (push) Successful in 41s
Test / Hakurei (race detector) (push) Successful in 4m7s
Test / Hakurei (push) Successful in 2m35s
Test / Flake checks (push) Successful in 1m35s
This checks init timeout on lingering process after initial process termination. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
16409b37a2
commit
f09133a224
@ -112,7 +112,31 @@
|
||||
};
|
||||
};
|
||||
|
||||
commonPaths = [
|
||||
{
|
||||
type = "bind";
|
||||
src = "/var/tmp";
|
||||
write = true;
|
||||
}
|
||||
];
|
||||
|
||||
apps = {
|
||||
"cat.gensokyo.extern.bash.linger-timeout" = {
|
||||
name = "hakurei-check-linger-timeout";
|
||||
identity = 9999;
|
||||
share = pkgs.bash;
|
||||
packages = [ pkgs.bash ];
|
||||
command = ''
|
||||
sleep infinity & disown
|
||||
exit
|
||||
'';
|
||||
wait_delay = 1;
|
||||
enablements = {
|
||||
wayland = false;
|
||||
pulse = false;
|
||||
};
|
||||
};
|
||||
|
||||
"cat.gensokyo.extern.foot.noEnablements" = {
|
||||
name = "ne-foot";
|
||||
identity = 1;
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user