summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2017-09-16 11:47:50 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2017-09-16 12:45:28 +0200
commitffd56ba4f6388abfe5290fc411a8ffb27e9d5d30 (patch)
tree286ad0fd554add85a301bdf3c29da3a508f26e03 /nixos/tests
parentc85cf60c833b99bc3b84aa0f5f2d20c5d6a39cc3 (diff)
downloadnixpkgs-ffd56ba4f6388abfe5290fc411a8ffb27e9d5d30.tar
nixpkgs-ffd56ba4f6388abfe5290fc411a8ffb27e9d5d30.tar.gz
nixpkgs-ffd56ba4f6388abfe5290fc411a8ffb27e9d5d30.tar.bz2
nixpkgs-ffd56ba4f6388abfe5290fc411a8ffb27e9d5d30.tar.lz
nixpkgs-ffd56ba4f6388abfe5290fc411a8ffb27e9d5d30.tar.xz
nixpkgs-ffd56ba4f6388abfe5290fc411a8ffb27e9d5d30.tar.zst
nixpkgs-ffd56ba4f6388abfe5290fc411a8ffb27e9d5d30.zip
nixos/tests: move kernel-params test to misc
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/kernel-params.nix24
-rw-r--r--nixos/tests/misc.nix6
2 files changed, 6 insertions, 24 deletions
diff --git a/nixos/tests/kernel-params.nix b/nixos/tests/kernel-params.nix
deleted file mode 100644
index 14a39335691..00000000000
--- a/nixos/tests/kernel-params.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-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");
-    '';
-})
diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix
index 222b60ab24a..79290861cb0 100644
--- a/nixos/tests/misc.nix
+++ b/nixos/tests/misc.nix
@@ -26,6 +26,7 @@ import ./make-test.nix ({ pkgs, ...} : {
       users.users.sybil = { isNormalUser = true; group = "wheel"; };
       security.sudo = { enable = true; wheelNeedsPassword = false; };
       boot.kernel.sysctl."vm.swappiness" = 1;
+      boot.kernelParams = [ "vsyscall=emulate" ];
     };
 
   testScript =
@@ -126,5 +127,10 @@ import ./make-test.nix ({ pkgs, ...} : {
           $machine->execute('sysctl vm.swappiness=60');
           $machine->succeed('[ `sysctl -ne vm.swappiness` = 60 ]');
       };
+
+      # Test boot parameters
+      subtest "bootparam", sub {
+          $machine->succeed('grep -Fq vsyscall=emulate /proc/cmdline');
+      };
     '';
 })