1 { system ? builtins.currentSystem
3 , pkgs ? import ../.. { inherit system config; }
4 , systemdStage1 ? false
7 import ./make-test-python.nix {
10 nodes.machine = { lib, ... }: {
11 virtualisation.emptyDiskImages = [ 1 ];
13 virtualisation.fileSystems = {
21 boot.initrd.systemd.enable = systemdStage1;
24 testScript = { nodes, ...}:
26 rootDevice = nodes.machine.virtualisation.rootDevice;
29 machine.wait_for_unit("default.target")
31 with subtest("root fs is fsckd"):
32 machine.succeed("journalctl -b | grep '${if systemdStage1
33 then "fsck.*${builtins.baseNameOf rootDevice}.*clean"
34 else "fsck.ext4.*${rootDevice}"}'")
36 with subtest("mnt fs is fsckd"):
37 machine.succeed("journalctl -b | grep 'fsck.*vdb.*clean'")
39 "grep 'Requires=systemd-fsck@dev-vdb.service' /run/systemd/generator/mnt.mount"
42 "grep 'After=systemd-fsck@dev-vdb.service' /run/systemd/generator/mnt.mount"