fix test fail when WANT_READ/WRITE returned
@@ -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 );
}
