mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-10 13:14:30 +00:00
tests/ssl_helpers: Check that message queue is popped
mbedtls_test_mock_tcp_recv_msg is currently popping a message queue and does not check if this was done correctly. This extra check makes the test more complete/robust. Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
This commit is contained in:
parent
3e419b06da
commit
1fb69a9e91
@ -551,7 +551,10 @@ int mbedtls_test_mock_tcp_recv_msg(void *ctx,
|
|||||||
* happen in test environment, unless forced manually. */
|
* happen in test environment, unless forced manually. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mbedtls_test_ssl_message_queue_pop_info(queue, buf_len);
|
ret = mbedtls_test_ssl_message_queue_pop_info(queue, buf_len);
|
||||||
|
if (ret < 0) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
return (msg_len > INT_MAX) ? INT_MAX : (int) msg_len;
|
return (msg_len > INT_MAX) ? INT_MAX : (int) msg_len;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user