1 import ./make-test-python.nix ({ lib, pkgs, ... }: {
2 name = "systemd-initrd-modprobe";
4 nodes.machine = { pkgs, ... }: {
5 testing.initrdBackdoor = true;
6 boot.initrd.systemd.enable = true;
7 boot.initrd.kernelModules = [ "tcp_hybla" ]; # Load module in initrd.
8 boot.extraModprobeConfig = ''
9 options tcp_hybla rtt0=42
14 machine.wait_for_unit("initrd.target")
15 rtt = machine.succeed("cat /sys/module/tcp_hybla/parameters/rtt0")
16 assert int(rtt) == 42, "Parameter should be respected for initrd kernel modules"
18 # Make sure it sticks in stage 2
20 machine.wait_for_unit("multi-user.target")
21 rtt = machine.succeed("cat /sys/module/tcp_hybla/parameters/rtt0")
22 assert int(rtt) == 42, "Parameter should be respected for initrd kernel modules"