diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-15 02:30:47 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-15 02:30:47 +0900 |
| commit | a2a291791c6447528d3b1abc1ec57c7b213730b6 (patch) | |
| tree | 4d4515976d798b461d8df358c272364c5cf0b2e1 /test | |
| parent | 8690419c2d577a27efe3cfcafc39c05b7646926b (diff) | |
internal/sys: separate hsu uid cache
This begins the effort of the removal of the sys package.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/test.py b/test/test.py index 4d31ceee..537b4b16 100644 --- a/test/test.py +++ b/test/test.py @@ -8,9 +8,7 @@ NODE_GROUPS = ["nodes", "floating_nodes"] def swaymsg(command: str = "", succeed=True, type="command"): assert command != "" or type != "command", "Must specify command or type" shell = q(f"swaymsg -t {q(type)} -- {q(command)}") - with machine.nested( - f"sending swaymsg {shell!r}" + " (allowed to fail)" * (not succeed) - ): + with machine.nested(f"sending swaymsg {shell!r}" + " (allowed to fail)" * (not succeed)): ret = (machine.succeed if succeed else machine.execute)( f"su - alice -c {shell}" ) @@ -102,7 +100,7 @@ print(machine.fail("sudo -u alice -i hsu")) # Verify hsu fault behaviour: if denyOutput != "hsu: uid 1001 is not in the hsurc file\n": raise Exception(f"unexpected deny output:\n{denyOutput}") -if denyOutputVerbose != "hsu: uid 1001 is not in the hsurc file\nhakurei: *cannot obtain uid from setuid wrapper: permission denied\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}") check_offset = 0 |
