2021-02-26 21:37:33 +01:00
|
|
|
import ./make-test-python.nix ({ lib, ...} :
|
2021-02-26 13:06:18 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "ksm";
|
2021-02-26 21:37:33 +01:00
|
|
|
meta = with lib.maintainers; {
|
2021-02-26 13:06:18 +01:00
|
|
|
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")
|
|
|
|
'';
|
|
|
|
})
|