diff options
author | Will Fancher <elvishjerricco@gmail.com> | 2023-09-20 06:26:03 -0400 |
---|---|---|
committer | Will Fancher <elvishjerricco@gmail.com> | 2023-11-09 17:53:49 -0500 |
commit | e9e2240763e409b9b634aa73712578be3fda6b1e (patch) | |
tree | 8b4822b36699a08317d4b27c57576b48f5c290f7 /nixos/tests/systemd-initrd-modprobe.nix | |
parent | b41cbee0fd2531b00369c787b20f5b20f94cfc15 (diff) |
nixos/tests/systemd-initrd-modprobe: Test parameter in stage 1
Diffstat (limited to 'nixos/tests/systemd-initrd-modprobe.nix')
-rw-r--r-- | nixos/tests/systemd-initrd-modprobe.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/tests/systemd-initrd-modprobe.nix b/nixos/tests/systemd-initrd-modprobe.nix index bf635a10d0e97..0f93492176b44 100644 --- a/nixos/tests/systemd-initrd-modprobe.nix +++ b/nixos/tests/systemd-initrd-modprobe.nix @@ -2,6 +2,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { name = "systemd-initrd-modprobe"; nodes.machine = { pkgs, ... }: { + testing.initrdBackdoor = true; boot.initrd.systemd.enable = true; boot.initrd.kernelModules = [ "loop" ]; # Load module in initrd. boot.extraModprobeConfig = '' @@ -10,6 +11,12 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { }; testScript = '' + machine.wait_for_unit("initrd.target") + max_loop = machine.succeed("cat /sys/module/loop/parameters/max_loop") + assert int(max_loop) == 42, "Parameter should be respected for initrd kernel modules" + + # Make sure it sticks in stage 2 + machine.switch_root() machine.wait_for_unit("multi-user.target") max_loop = machine.succeed("cat /sys/module/loop/parameters/max_loop") assert int(max_loop) == 42, "Parameter should be respected for initrd kernel modules" |