mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-13 10:07:29 +00:00
Merge pull request #310823 from WilliButz/systemd-initrd/fix-aarch64-modprobe-test
This commit is contained in:
commit
fc96e711c3
@ -4,21 +4,21 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
testing.initrdBackdoor = true;
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.initrd.kernelModules = [ "loop" ]; # Load module in initrd.
|
||||
boot.initrd.kernelModules = [ "tcp_hybla" ]; # Load module in initrd.
|
||||
boot.extraModprobeConfig = ''
|
||||
options loop max_loop=42
|
||||
options tcp_hybla rtt0=42
|
||||
'';
|
||||
};
|
||||
|
||||
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"
|
||||
rtt = machine.succeed("cat /sys/module/tcp_hybla/parameters/rtt0")
|
||||
assert int(rtt) == 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"
|
||||
rtt = machine.succeed("cat /sys/module/tcp_hybla/parameters/rtt0")
|
||||
assert int(rtt) == 42, "Parameter should be respected for initrd kernel modules"
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user