aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-07 01:50:56 +0900
committerOphestra <cat@gensokyo.uk>2025-10-07 04:24:45 +0900
commit9e48d7f5626aa966a23754534f3120855d6a7c32 (patch)
treeade6eb09abd52b4c64bb5eb9dfb5246ee93454fe /test
parentf280994957bdc1c6defdd4bd9dcc44dd83a5cfd5 (diff)
hst/config: move container fields from toplevel
This change also moves pd behaviour to cmd/hakurei, as this does not belong in the hst API. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test')
-rw-r--r--test/sandbox/case/pd.nix1
-rw-r--r--test/test.py8
2 files changed, 4 insertions, 5 deletions
diff --git a/test/sandbox/case/pd.nix b/test/sandbox/case/pd.nix
index ad97c996..140398e8 100644
--- a/test/sandbox/case/pd.nix
+++ b/test/sandbox/case/pd.nix
@@ -182,7 +182,6 @@
(ent "/" "/dev/mqueue" "rw,nosuid,nodev,noexec,relatime" "mqueue" "mqueue" "rw")
(ent "/" "/dev/shm" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,uid=1000000,gid=1000000")
(ent "/kvm" "/dev/kvm" "rw,nosuid" "devtmpfs" "devtmpfs" ignore)
- (ent "/" "/run/nscd" "ro,nosuid,nodev,relatime" "tmpfs" "readonly" "ro,mode=755,uid=1000000,gid=1000000")
(ent "/etc" ignore "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw")
(ent "/" "/run/user/1000" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,size=8k,mode=755,uid=1000000,gid=1000000")
(ent "/" "/run/nscd" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,size=8k,mode=755,uid=1000000,gid=1000000")
diff --git a/test/test.py b/test/test.py
index a1e6b0f5..f4e34934 100644
--- a/test/test.py
+++ b/test/test.py
@@ -61,14 +61,14 @@ def check_state(name, enablements):
config = instance['config']
command = f"{name}-start"
- if not (config['path'].startswith("/nix/store/")) or not (config['path'].endswith(command)):
+ if not (config['container']['path'].startswith("/nix/store/")) or not (config['container']['path'].endswith(command)):
raise Exception(f"unexpected path {config['path']}")
- if len(config['args']) != 1 or config['args'][0] != command:
+ if len(config['container']['args']) != 1 or config['container']['args'][0] != command:
raise Exception(f"unexpected args {config['args']}")
if config['enablements'] != enablements:
- raise Exception(f"unexpected enablements {instance['config']['enablements']}")
+ raise Exception(f"unexpected enablements {config['enablements']['enablements']}")
def hakurei(command):
@@ -104,7 +104,7 @@ if denyOutputVerbose != "hsu: uid 1001 is not in the hsurc file\nhakurei: *canno
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')
+machine.succeed('sudo -u alice -i hakurei-check-linger-timeout > /var/tmp/linger-stdout 2> /var/tmp/linger-stderr || (cat /var/tmp/linger-stderr; false)')
linger_stdout = machine.succeed("cat /var/tmp/linger-stdout")
linger_stderr = machine.succeed("cat /var/tmp/linger-stderr")
if linger_stdout != "":