about summary refs log tree commit diff
path: root/nixos/tests/systemd-initrd-modprobe.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-10 15:18:19 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-10 15:18:19 +0100
commitafabc4a15d5ba6631bd4d865b8be37fc67d52809 (patch)
tree2342d9e8bd8b4cfbfee2b9a98c088df9f1c809ca /nixos/tests/systemd-initrd-modprobe.nix
parent9a0c85ffc5aedc46b4d81f3b9fc22d7f488e3ff9 (diff)
parent714e527a726c9613fca8e13586a1b19198d68d9b (diff)
downloadnixlib-afabc4a15d5ba6631bd4d865b8be37fc67d52809.tar
nixlib-afabc4a15d5ba6631bd4d865b8be37fc67d52809.tar.gz
nixlib-afabc4a15d5ba6631bd4d865b8be37fc67d52809.tar.bz2
nixlib-afabc4a15d5ba6631bd4d865b8be37fc67d52809.tar.lz
nixlib-afabc4a15d5ba6631bd4d865b8be37fc67d52809.tar.xz
nixlib-afabc4a15d5ba6631bd4d865b8be37fc67d52809.tar.zst
nixlib-afabc4a15d5ba6631bd4d865b8be37fc67d52809.zip
Merge remote-tracking branch 'origin/master' into HEAD
Conflicts:
	pkgs/development/libraries/SDL2/default.nix
Diffstat (limited to 'nixos/tests/systemd-initrd-modprobe.nix')
-rw-r--r--nixos/tests/systemd-initrd-modprobe.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/tests/systemd-initrd-modprobe.nix b/nixos/tests/systemd-initrd-modprobe.nix
index bf635a10d0e9..0f93492176b4 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"