nixpkgs/nixos/tests/kexec.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
664 B
Nix
Raw Normal View History

# Test whether fast reboots via kexec work.
import ./make-test-python.nix ({ pkgs, lib, ...} : {
2014-06-28 14:04:49 +00:00
name = "kexec";
meta = with lib.maintainers; {
maintainers = [ eelco ];
};
2022-03-20 23:15:30 +00:00
nodes.machine = { ... }:
{ virtualisation.vlans = [ ]; };
testScript =
''
machine.wait_for_unit("multi-user.target")
2021-10-24 22:15:56 +00:00
machine.succeed('kexec --load /run/current-system/kernel --initrd /run/current-system/initrd --command-line "$(</proc/cmdline)"')
machine.execute("systemctl kexec >&2 &", check_return=False)
machine.connected = False
2021-10-24 22:15:56 +00:00
machine.connect()
machine.wait_for_unit("multi-user.target")
2021-10-24 22:15:56 +00:00
machine.shutdown()
'';
})