mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2026-02-02 09:25:08 +01:00
tests: read serial instead of OCR for crypto tests
This commit is contained in:
parent
1ea3846dfc
commit
7207e54351
6 changed files with 10 additions and 14 deletions
|
|
@ -18,10 +18,9 @@ makeDiskoTest {
|
||||||
machine.succeed("mountpoint /ext4onzfs");
|
machine.succeed("mountpoint /ext4onzfs");
|
||||||
machine.succeed("mountpoint /ext4_on_lvm");
|
machine.succeed("mountpoint /ext4_on_lvm");
|
||||||
'';
|
'';
|
||||||
enableOCR = true;
|
|
||||||
bootCommands = ''
|
bootCommands = ''
|
||||||
machine.wait_for_text("[Pp]assphrase for")
|
machine.wait_for_console_text("vda")
|
||||||
machine.send_chars("secretsecret\n")
|
machine.send_console("secretsecret\n")
|
||||||
'';
|
'';
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
|
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,9 @@ makeDiskoTest {
|
||||||
machine.succeed("mountpoint /ext4onzfs");
|
machine.succeed("mountpoint /ext4onzfs");
|
||||||
machine.succeed("mountpoint /ext4_on_lvm");
|
machine.succeed("mountpoint /ext4_on_lvm");
|
||||||
'';
|
'';
|
||||||
enableOCR = true;
|
|
||||||
bootCommands = ''
|
bootCommands = ''
|
||||||
machine.wait_for_text("[Pp]assphrase for")
|
machine.wait_for_console_text("vda")
|
||||||
machine.send_chars("secretsecret\n")
|
machine.send_console("secretsecret\n")
|
||||||
'';
|
'';
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
|
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
documentation.enable = false;
|
documentation.enable = false;
|
||||||
hardware.enableAllFirmware = lib.mkForce false;
|
hardware.enableAllFirmware = lib.mkForce false;
|
||||||
networking.hostId = "8425e349"; # from profiles/base.nix, needed for zfs
|
networking.hostId = "8425e349"; # from profiles/base.nix, needed for zfs
|
||||||
boot.kernelParams = lib.mkAfter [ "console=tty0" ]; # needed to have serial interaction during boot
|
boot.kernelParams = lib.mkIf enableOCR [ "console=tty0" ]; # needed for OCR
|
||||||
boot.zfs.devNodes = "/dev/disk/by-uuid"; # needed because /dev/disk/by-id is empty in qemu-vms
|
boot.zfs.devNodes = "/dev/disk/by-uuid"; # needed because /dev/disk/by-id is empty in qemu-vms
|
||||||
|
|
||||||
boot.consoleLogLevel = lib.mkForce 100;
|
boot.consoleLogLevel = lib.mkForce 100;
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,8 @@ makeDiskoTest {
|
||||||
machine.succeed("cryptsetup isLuks /dev/vda2");
|
machine.succeed("cryptsetup isLuks /dev/vda2");
|
||||||
machine.succeed("mountpoint /home");
|
machine.succeed("mountpoint /home");
|
||||||
'';
|
'';
|
||||||
enableOCR = true;
|
|
||||||
bootCommands = ''
|
bootCommands = ''
|
||||||
machine.wait_for_text("[Pp]assphrase for")
|
machine.wait_for_console_text("vda")
|
||||||
machine.send_chars("secretsecret\n")
|
machine.send_console("secretsecret\n")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,9 @@ makeDiskoTest {
|
||||||
machine.succeed("mountpoint /ext4onzfs");
|
machine.succeed("mountpoint /ext4onzfs");
|
||||||
machine.succeed("mountpoint /ext4_on_lvm");
|
machine.succeed("mountpoint /ext4_on_lvm");
|
||||||
'';
|
'';
|
||||||
enableOCR = true;
|
|
||||||
bootCommands = ''
|
bootCommands = ''
|
||||||
machine.wait_for_text("[Pp]assphrase for")
|
machine.wait_for_console_text("vda")
|
||||||
machine.send_chars("secretsecret\n")
|
machine.send_console("secretsecret\n")
|
||||||
'';
|
'';
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
|
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ makeDiskoTest {
|
||||||
'';
|
'';
|
||||||
enableOCR = true;
|
enableOCR = true;
|
||||||
bootCommands = ''
|
bootCommands = ''
|
||||||
machine.wait_for_text("(?:passphrase|key) for")
|
machine.wait_for_text("passphrase for")
|
||||||
machine.send_chars("secretsecret\n")
|
machine.send_chars("secretsecret\n")
|
||||||
'';
|
'';
|
||||||
extraTestScript = ''
|
extraTestScript = ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue