Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
|
|
crasher = pkgs.writeCBin "crasher" "int main;";
|
|
|
|
commonConfig = {
|
|
systemd.services.crasher.serviceConfig = {
|
|
ExecStart = "${crasher}/bin/crasher";
|
|
StateDirectory = "crasher";
|
|
WorkingDirectory = "%S/crasher";
|
|
Restart = "no";
|
|
};
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
name = "systemd-coredump";
|
|
meta = with pkgs.lib.maintainers; {
|
|
maintainers = [ squalus ];
|
|
};
|
|
|
|
nodes.machine1 = { pkgs, lib, ... }: commonConfig;
|
|
nodes.machine2 =
|
|
{ pkgs, lib, ... }:
|
|
lib.recursiveUpdate commonConfig {
|
|
systemd.coredump.enable = false;
|
|
systemd.package = pkgs.systemd.override {
|
|
withCoredump = false;
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
with subtest("systemd-coredump enabled"):
|
|
machine1.wait_for_unit("multi-user.target")
|
|
machine1.wait_for_unit("systemd-coredump.socket")
|
|
machine1.systemctl("start crasher");
|
|
machine1.wait_until_succeeds("coredumpctl list | grep crasher", timeout=10)
|
|
machine1.fail("stat /var/lib/crasher/core")
|
|
|
|
with subtest("systemd-coredump disabled"):
|
|
machine2.systemctl("start crasher");
|
|
machine2.wait_until_succeeds("stat /var/lib/crasher/core", timeout=10)
|
|
'';
|
|
}
|