Browse Source

tests: Add kernelParams

nsd-state-dir
Tim Steinbach 5 years ago
parent
commit
3e2975e892
No known key found for this signature in database GPG Key ID: 472BFCCA96BD0EDA
  1. 1
      nixos/release-combined.nix
  2. 1
      nixos/release.nix
  3. 24
      nixos/tests/kernel-params.nix

1
nixos/release-combined.nix

@ -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)

1
nixos/release.nix

@ -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

@ -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…
Cancel
Save