tests: Add kernelParams
This commit is contained in:
parent
04b0f3255f
commit
3e2975e892
@ -93,6 +93,7 @@ in rec {
|
||||
(all nixos.tests.plasma5)
|
||||
(all nixos.tests.kernel-latest)
|
||||
(all nixos.tests.kernel-lts)
|
||||
(all nixos.tests.kernel-params)
|
||||
#(all nixos.tests.lightdm)
|
||||
(all nixos.tests.login)
|
||||
(all nixos.tests.misc)
|
||||
|
@ -264,6 +264,7 @@ in rec {
|
||||
tests.kernel-copperhead = tests/kernel-copperhead.nix {};
|
||||
tests.kernel-latest = tests/kernel-latest.nix {};
|
||||
tests.kernel-lts = tests/kernel-lts.nix {};
|
||||
tests.kernel-params = tests/kernel-params.nix {};
|
||||
tests.keystone = callTest tests/keystone.nix {};
|
||||
tests.kubernetes = hydraJob (import tests/kubernetes.nix { system = "x86_64-linux"; });
|
||||
tests.latestKernel.login = callTest tests/login.nix { latestKernel = true; };
|
||||
|
24
nixos/tests/kernel-params.nix
Normal file
24
nixos/tests/kernel-params.nix
Normal file
@ -0,0 +1,24 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "kernel-params";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
};
|
||||
|
||||
machine = { config, lib, pkgs, ... }:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
boot.kernelParams = [
|
||||
"nohibernate"
|
||||
"page_poison=1"
|
||||
"vsyscall=none"
|
||||
];
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->fail("cat /proc/cmdline | grep page_poison=0");
|
||||
$machine->succeed("cat /proc/cmdline | grep nohibernate");
|
||||
$machine->succeed("cat /proc/cmdline | grep page_poison=1");
|
||||
$machine->succeed("cat /proc/cmdline | grep vsyscall=none");
|
||||
'';
|
||||
})
|
Loading…
Reference in New Issue
Block a user