nixosTests.systemd-initrd-luks-{fido2,unl0kr}: fix failing LUKS tests (#529111)

This commit is contained in:
nikstur 2026-06-07 15:02:08 +00:00 committed by GitHub
commit 4a65fb9dc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,6 @@
};
};
virtualisation.rootDevice = "/dev/mapper/cryptroot";
virtualisation.fileSystems."/".autoFormat = true;
};
};
@ -52,6 +51,8 @@
# Create encrypted volume
machine.wait_for_unit("multi-user.target")
machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdb -")
machine.succeed("echo -n supersecret | cryptsetup luksOpen -q /dev/vdb cryptroot")
machine.succeed("mkfs.ext4 /dev/mapper/cryptroot")
machine.succeed("PASSWORD=supersecret SYSTEMD_LOG_LEVEL=debug systemd-cryptenroll --fido2-device=auto /dev/vdb |& systemd-cat")
# Boot from the encrypted disk

View file

@ -73,7 +73,6 @@ in
cryptroot2.device = "/dev/vdc";
};
virtualisation.rootDevice = "/dev/mapper/cryptroot";
virtualisation.fileSystems."/".autoFormat = true;
# test mounting device unlocked in initrd after switching root
virtualisation.fileSystems."/cryptroot2" = {
device = "/dev/mapper/cryptroot2";
@ -100,7 +99,7 @@ in
machine.succeed("mkfs.ext4 /dev/mapper/cryptroot2")
# Boot from the encrypted disk
machine.succeed("${boot-luks}/bin/switch-to-configuration boot")
machine.succeed("${boot-luks}/bin/switch-to-configuration boot")
machine.succeed("sync")
machine.crash()

View file

@ -791,7 +791,7 @@ stdenv.mkDerivation (finalAttrs: {
systemd-credentials-tpm2
systemd-escaping
systemd-initrd-btrfs-raid
# systemd-initrd-luks-fido2 # broken on master
systemd-initrd-luks-fido2
systemd-initrd-luks-keyfile
systemd-initrd-luks-empty-passphrase
systemd-initrd-luks-password