diff --git a/nixos/tests/shadow.nix b/nixos/tests/shadow.nix index e8624fde4cbd..0cc1d6811400 100644 --- a/nixos/tests/shadow.nix +++ b/nixos/tests/shadow.nix @@ -35,6 +35,7 @@ in import ./make-test-python.nix ({ pkgs, ... }: { shadow.send_chars("emma\n") shadow.wait_until_tty_matches(2, "login: emma") shadow.wait_until_succeeds("pgrep login") + shadow.sleep(2) shadow.send_chars("${password1}\n") shadow.send_chars("whoami > /tmp/1\n") shadow.wait_for_file("/tmp/1") @@ -49,6 +50,7 @@ in import ./make-test-python.nix ({ pkgs, ... }: { shadow.send_chars("emma\n") shadow.wait_until_tty_matches(3, "login: emma") shadow.wait_until_succeeds("pgrep login") + shadow.sleep(2) shadow.send_chars("${password1}\n") shadow.send_chars("passwd\n") shadow.sleep(2) @@ -66,12 +68,14 @@ in import ./make-test-python.nix ({ pkgs, ... }: { shadow.send_chars("emma\n") shadow.wait_until_tty_matches(4, "login: emma") shadow.wait_until_succeeds("pgrep login") + shadow.sleep(2) shadow.send_chars("${password1}\n") shadow.wait_until_tty_matches(4, "Login incorrect") shadow.wait_until_tty_matches(4, "login:") shadow.send_chars("emma\n") shadow.wait_until_tty_matches(4, "login: emma") shadow.wait_until_succeeds("pgrep login") + shadow.sleep(2) shadow.send_chars("${password3}\n") shadow.send_chars("whoami > /tmp/2\n") shadow.wait_for_file("/tmp/2")