mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 11:02:05 +00:00
nixos/test/ksm: add simple test
This commit is contained in:
parent
b884af7c1d
commit
ed0a29c88d
|
@ -195,6 +195,7 @@ in
|
|||
keymap = handleTest ./keymap.nix {};
|
||||
knot = handleTest ./knot.nix {};
|
||||
krb5 = discoverTests (import ./krb5 {});
|
||||
ksm = handleTest ./ksm.nix {};
|
||||
kubernetes.dns = handleTestOn ["x86_64-linux"] ./kubernetes/dns.nix {};
|
||||
# kubernetes.e2e should eventually replace kubernetes.rbac when it works
|
||||
#kubernetes.e2e = handleTestOn ["x86_64-linux"] ./kubernetes/e2e.nix {};
|
||||
|
|
22
nixos/tests/ksm.nix
Normal file
22
nixos/tests/ksm.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
import ./make-test-python.nix ({ pkgs, ...} :
|
||||
|
||||
{
|
||||
name = "ksm";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ rnhmjoj ];
|
||||
};
|
||||
|
||||
machine = { ... }: {
|
||||
imports = [ ../modules/profiles/minimal.nix ];
|
||||
|
||||
hardware.ksm.enable = true;
|
||||
hardware.ksm.sleep = 300;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
machine.start()
|
||||
machine.wait_until_succeeds("test $(</sys/kernel/mm/ksm/run) -eq 1")
|
||||
machine.wait_until_succeeds("test $(</sys/kernel/mm/ksm/sleep_millisecs) -eq 300")
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue