nixos/tests/hardened: test loading out-of-tree-modules
This commit is contained in:
parent
b3d8aa2677
commit
39c30a33c1
@ -5,7 +5,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
|
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
|
||||||
users.users.sybil = { isNormalUser = true; group = "wheel"; };
|
users.users.sybil = { isNormalUser = true; group = "wheel"; };
|
||||||
@ -22,12 +22,19 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
options = [ "noauto" ];
|
options = [ "noauto" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
|
||||||
|
boot.kernelModules = [ "wireguard" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
''
|
''
|
||||||
$machine->waitForUnit("multi-user.target");
|
$machine->waitForUnit("multi-user.target");
|
||||||
|
|
||||||
|
# Test loading out-of-tree modules
|
||||||
|
subtest "extra-module-packages", sub {
|
||||||
|
$machine->succeed("grep -Fq wireguard /proc/modules");
|
||||||
|
};
|
||||||
|
|
||||||
# Test hidepid
|
# Test hidepid
|
||||||
subtest "hidepid", sub {
|
subtest "hidepid", sub {
|
||||||
$machine->succeed("grep -Fq hidepid=2 /proc/mounts");
|
$machine->succeed("grep -Fq hidepid=2 /proc/mounts");
|
||||||
|
Loading…
Reference in New Issue
Block a user