nixos/tests/systemd-binfmt: chroot: Assert extra-sandbox-path == []

This commit is contained in:
dramforever
2026-02-26 15:17:43 +08:00
parent 0de75c6179
commit d3120123aa

View File

@@ -103,7 +103,12 @@ in
chroot = makeTest {
name = "systemd-binfmt-chroot";
nodes.machine =
{ pkgs, lib, ... }:
{
pkgs,
lib,
config,
...
}:
{
boot.binfmt.emulatedSystems = [
"aarch64-linux"
@@ -121,6 +126,13 @@ in
echo 42 | chroot /tmp/chroot /yaml2json | grep 42
'')
];
assertions = [
{
assertion = config.nix.settings.extra-sandbox-paths == [ ];
message = "Using binfmt_misc with static emulators, nix.settings.extra-sandbox-paths should be empty";
}
];
};
testScript = ''
machine.start()