From 1443537da3b6187778035f5ca98cda3c10e19f73 Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Wed, 1 Jun 2022 15:53:31 +0800 Subject: [PATCH] fix test fail when WANT_READ/WRITE returned Signed-off-by: Jerry Yu --- tests/suites/test_suite_ssl.function | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index 8a08963a66..6ba4e2043f 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -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 ); }