From 07d610c8ab3104c5e13d605e475ab7d1b28c08ff Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Fri, 19 Jan 2024 23:38:27 +0100 Subject: nixosTests.watchdogd: init --- nixos/tests/watchdogd.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nixos/tests/watchdogd.nix (limited to 'nixos/tests/watchdogd.nix') diff --git a/nixos/tests/watchdogd.nix b/nixos/tests/watchdogd.nix new file mode 100644 index 0000000000000..663e97cbae104 --- /dev/null +++ b/nixos/tests/watchdogd.nix @@ -0,0 +1,22 @@ +import ./make-test-python.nix ({ lib, ... }: { + name = "watchdogd"; + meta.maintainers = with lib.maintainers; [ vifino ]; + + nodes.machine = { pkgs, ... }: { + virtualisation.qemu.options = [ + "-device i6300esb" # virtual watchdog timer + ]; + boot.kernelModules = [ "i6300esb" ]; + services.watchdogd.enable = true; + services.watchdogd.settings = { + supervisor.enabled = true; + }; + }; + + testScript = '' + machine.wait_for_unit("watchdogd.service") + + assert "i6300ESB" in machine.succeed("watchdogctl status") + machine.succeed("watchdogctl test") + ''; +}) -- cgit 1.4.1