fix test fail when WANT_READ/WRITE returned

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2022-06-01 15:53:31 +08:00
parent 66537f40b6
commit 1443537da3

View File

@ -4910,12 +4910,16 @@ void move_handshake_to_state(int endpoint_type, int state, int need_pass)
state );
if( need_pass )
{
TEST_ASSERT( ret == 0 );
TEST_ASSERT( ret == 0 ||
ret == MBEDTLS_ERR_SSL_WANT_READ ||
ret == MBEDTLS_ERR_SSL_WANT_WRITE );
TEST_ASSERT( base_ep.ssl.state == state );
}
else
{
TEST_ASSERT( ret != 0 );
TEST_ASSERT( ret != 0 &&
ret != MBEDTLS_ERR_SSL_WANT_READ &&
ret != MBEDTLS_ERR_SSL_WANT_WRITE );
TEST_ASSERT( base_ep.ssl.state != state );
}