diff options
author | Florian Klink <flokli@flokli.de> | 2019-08-19 17:59:30 +0200 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-08-25 22:26:12 +0200 |
commit | 6b075ddc8fc02358e5bd4b41cb3c36a691a1f424 (patch) | |
tree | 636408d2ba885d1227c769cc11555338174085a1 /nixos/tests/systemd.nix | |
parent | 0fb17141fb2c8a9d64ada11b7e3082b2b8041d7a (diff) | |
download | nixpkgs-6b075ddc8fc02358e5bd4b41cb3c36a691a1f424.tar nixpkgs-6b075ddc8fc02358e5bd4b41cb3c36a691a1f424.tar.gz nixpkgs-6b075ddc8fc02358e5bd4b41cb3c36a691a1f424.tar.bz2 nixpkgs-6b075ddc8fc02358e5bd4b41cb3c36a691a1f424.tar.lz nixpkgs-6b075ddc8fc02358e5bd4b41cb3c36a691a1f424.tar.xz nixpkgs-6b075ddc8fc02358e5bd4b41cb3c36a691a1f424.tar.zst nixpkgs-6b075ddc8fc02358e5bd4b41cb3c36a691a1f424.zip |
nixos/systemd: add cgroup accounting test
Diffstat (limited to 'nixos/tests/systemd.nix')
-rw-r--r-- | nixos/tests/systemd.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/tests/systemd.nix b/nixos/tests/systemd.nix index 3168c026d51..1c201e3b5dc 100644 --- a/nixos/tests/systemd.nix +++ b/nixos/tests/systemd.nix @@ -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:"'); + }; ''; }) |