From 85f2497a0d85760c989f281c60ef1c47ded17e77 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Tue, 5 Dec 2023 17:24:34 -0700 Subject: [PATCH] discard stdin from test --- apps/wolfsshd/test/sshd_login_grace_test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/wolfsshd/test/sshd_login_grace_test.sh b/apps/wolfsshd/test/sshd_login_grace_test.sh index f280f01bc..00b950ba9 100755 --- a/apps/wolfsshd/test/sshd_login_grace_test.sh +++ b/apps/wolfsshd/test/sshd_login_grace_test.sh @@ -47,6 +47,9 @@ if [ "$RESULT" != 0 ]; then exit 1 fi +# attempt clearing out stdin from previous echo/grep +read -t 1 -n 1000 discard + # test grace login timeout by stalling on password prompt timeout --foreground 7 "$TEST_CLIENT" -u "$USER" -h "$TEST_HOST" -p "$TEST_PORT" -t