mirror of https://github.com/wolfSSL/wolfssh.git
tests: pin the get_fd invalid-socket sentinel
test_wolfSSH_set_fd() compares the NULL return of wolfSSH_get_fd() against the platform invalid-socket sentinel, the value wolfSSH_new() initializes rfd/wfd to. The old check only asserted the result was not WS_SUCCESS, which the previous WS_BAD_ARGUMENT return also satisfied.pull/1235/head
parent
ed633eac0c
commit
28bf47d2a0
|
|
@ -238,7 +238,11 @@ static void test_wolfSSH_set_fd(void)
|
|||
|
||||
AssertIntNE(WS_SUCCESS, wolfSSH_set_fd(NULL, fd));
|
||||
check = wolfSSH_get_fd(NULL);
|
||||
AssertFalse(WS_SUCCESS == check);
|
||||
#ifdef USE_WINDOWS_API
|
||||
AssertTrue(INVALID_SOCKET == check);
|
||||
#else
|
||||
AssertTrue(-1 == check);
|
||||
#endif
|
||||
|
||||
AssertIntEQ(WS_SUCCESS, wolfSSH_set_fd(ssh, fd));
|
||||
check = wolfSSH_get_fd(ssh);
|
||||
|
|
|
|||
Loading…
Reference in New Issue