diff options
author | Tim Steinbach <tim@nequissimus.com> | 2017-09-05 19:04:43 -0400 |
---|---|---|
committer | Tim Steinbach <tim@nequissimus.com> | 2017-09-05 19:04:43 -0400 |
commit | 3e2975e892527fe45e4f574401cb7d19eb9542a6 (patch) | |
tree | de591ee5cc38af24965895cb9e74cc14c5236bb4 /nixos/tests | |
parent | 04b0f3255fc2c9e275ac93eeb29c37f6465a3992 (diff) | |
download | nixlib-3e2975e892527fe45e4f574401cb7d19eb9542a6.tar nixlib-3e2975e892527fe45e4f574401cb7d19eb9542a6.tar.gz nixlib-3e2975e892527fe45e4f574401cb7d19eb9542a6.tar.bz2 nixlib-3e2975e892527fe45e4f574401cb7d19eb9542a6.tar.lz nixlib-3e2975e892527fe45e4f574401cb7d19eb9542a6.tar.xz nixlib-3e2975e892527fe45e4f574401cb7d19eb9542a6.tar.zst nixlib-3e2975e892527fe45e4f574401cb7d19eb9542a6.zip |
tests: Add kernelParams
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/kernel-params.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nixos/tests/kernel-params.nix b/nixos/tests/kernel-params.nix new file mode 100644 index 000000000000..14a393356911 --- /dev/null +++ b/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"); + ''; +}) |