mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-05 20:55:46 +03:00
tests: Fix blocking mode in password auth test.
This commit is contained in:
@@ -265,7 +265,6 @@ static void torture_auth_password_nonblocking(void **state) {
|
|||||||
|
|
||||||
rc = ssh_connect(session);
|
rc = ssh_connect(session);
|
||||||
assert_true(rc == SSH_OK);
|
assert_true(rc == SSH_OK);
|
||||||
ssh_set_blocking(session,0);
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
rc = ssh_userauth_none(session, NULL);
|
rc = ssh_userauth_none(session, NULL);
|
||||||
@@ -278,6 +277,7 @@ static void torture_auth_password_nonblocking(void **state) {
|
|||||||
rc = ssh_userauth_list(session, NULL);
|
rc = ssh_userauth_list(session, NULL);
|
||||||
assert_true(rc & SSH_AUTH_METHOD_PASSWORD);
|
assert_true(rc & SSH_AUTH_METHOD_PASSWORD);
|
||||||
|
|
||||||
|
ssh_set_blocking(session,0);
|
||||||
do {
|
do {
|
||||||
rc = ssh_userauth_password(session, NULL, password);
|
rc = ssh_userauth_password(session, NULL, password);
|
||||||
} while(rc==SSH_AUTH_AGAIN);
|
} while(rc==SSH_AUTH_AGAIN);
|
||||||
|
Reference in New Issue
Block a user