diff options
author | Luke Granger-Brown <git@lukegb.com> | 2020-12-01 16:03:53 +0000 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2020-12-01 17:36:04 +0100 |
commit | b5a328e58f32354676310c511e3834d2b805f810 (patch) | |
tree | e9ff6232e62bc035b65f7e5078b3bfb1bf81e32d | |
parent | 9d82d8b3c02ba8388addfea6687687d9b0c788e8 (diff) | |
download | nixpkgs-b5a328e58f32354676310c511e3834d2b805f810.tar nixpkgs-b5a328e58f32354676310c511e3834d2b805f810.tar.gz nixpkgs-b5a328e58f32354676310c511e3834d2b805f810.tar.bz2 nixpkgs-b5a328e58f32354676310c511e3834d2b805f810.tar.lz nixpkgs-b5a328e58f32354676310c511e3834d2b805f810.tar.xz nixpkgs-b5a328e58f32354676310c511e3834d2b805f810.tar.zst nixpkgs-b5a328e58f32354676310c511e3834d2b805f810.zip |
nixos/tests/misc: account for cgroupv2
Since #104094 (d22b3ed4bcd24dcc96fd9f99c75bb568bffe2a8c), NixOS is using the unified cgroup hierarchy by default (aka cgroupv2). This means the blkio controller isn't there, so we should test for something else (e.g. the presence of the io controller). Fixes #105581.
-rw-r--r-- | nixos/tests/misc.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix index ae150553273..40661cdca0a 100644 --- a/nixos/tests/misc.nix +++ b/nixos/tests/misc.nix @@ -88,8 +88,8 @@ import ./make-test-python.nix ({ pkgs, ...} : rec { with subtest("whether kernel.poweroff_cmd is set"): machine.succeed('[ -x "$(cat /proc/sys/kernel/poweroff_cmd)" ]') - with subtest("whether the blkio controller is properly enabled"): - machine.succeed("[ -e /sys/fs/cgroup/blkio/blkio.reset_stats ]") + with subtest("whether the io cgroupv2 controller is properly enabled"): + machine.succeed("grep -q '\\bio\\b' /sys/fs/cgroup/cgroup.controllers") with subtest("whether we have a reboot record in wtmp"): machine.shutdown |