summaryrefslogtreecommitdiffstats
path: root/nixos/tests/systemd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/systemd.nix')
-rw-r--r--nixos/tests/systemd.nix22
1 files changed, 13 insertions, 9 deletions
diff --git a/nixos/tests/systemd.nix b/nixos/tests/systemd.nix
index fadea52f1dbc..1c201e3b5dcc 100644
--- a/nixos/tests/systemd.nix
+++ b/nixos/tests/systemd.nix
@@ -78,19 +78,23 @@ import ./make-test.nix ({ pkgs, ... }: {
$machine->fail('dumpe2fs /dev/vdb | grep -q "^Last mount time: *n/a"');
};
- # Regression test for https://github.com/NixOS/nixpkgs/issues/35268
- subtest "file system with x-initrd.mount is not unmounted", sub {
- $machine->shutdown;
- $machine->waitForUnit('multi-user.target');
- # If the file system was unmounted during the shutdown the file system
- # has a last mount time, because the file system wasn't checked.
- $machine->fail('dumpe2fs /dev/vdb | grep -q "^Last mount time: *n/a"');
- };
-
subtest "systemd-shutdown works", sub {
$machine->shutdown;
$machine->waitForUnit('multi-user.target');
$machine->succeed('test -e /tmp/shared/shutdown-test');
};
+
+ # Test settings from /etc/sysctl.d/50-default.conf are applied
+ subtest "systemd sysctl settings are applied", sub {
+ $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:"');
+ };
'';
})