nixos/systemd: add cgroup accounting test

This commit is contained in:
Florian Klink 2019-08-19 17:59:30 +02:00
parent 0fb17141fb
commit 6b075ddc8f

View File

@ -89,5 +89,12 @@ import ./make-test.nix ({ pkgs, ... }: {
$machine->waitForUnit('multi-user.target');
$machine->succeed('sysctl net.core.default_qdisc | grep -q "fq_codel"');
};
# Test cgroup accounting is enabled
subtest "systemd cgroup accounting is enabled", sub {
$machine->waitForUnit('multi-user.target');
$machine->succeed('systemctl show testservice1.service -p IOAccounting | grep -q "yes"');
$machine->succeed('systemctl status testservice1.service | grep -q "CPU:"');
};
'';
})