about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2019-08-27 11:38:28 +0200
committerGitHub <noreply@github.com>2019-08-27 11:38:28 +0200
commit9a02d9c75e94aa63983a085df774ea9b7a728b29 (patch)
treebb6d696702528cdbae02c82887c73b61f0ec8ee3 /nixos/tests
parent4b09f9995d47e8bb0cf04d3d8ba873e35d20c751 (diff)
parent6b075ddc8fc02358e5bd4b41cb3c36a691a1f424 (diff)
Merge pull request #66984 from flokli/systemd-cgroup-accounting
nixos/systemd: enable systemd cgroup accounting by default
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/systemd.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/tests/systemd.nix b/nixos/tests/systemd.nix
index 3168c026d5140..1c201e3b5dcc2 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:"');
+   };
   '';
 })