3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/tests/ksm.nix
rnhmjoj 48052ca0dd
nixos/ksm: remove udev-settle dependency
The sysfs file /sys/kernel/mm/ksm/run seems to be available as soon as
the kernel has started, so no point in waiting for udev to "settle". If
for some reason it doesn't, we let the unit fail explicitly.
2021-02-26 22:10:10 +01:00

23 lines
496 B
Nix

import ./make-test-python.nix ({ lib, ...} :
{
name = "ksm";
meta = with 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")
'';
})