mirror of
https://github.com/cuberite/polarssl.git
synced 2025-08-04 03:06:10 -04: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
9aa9120b9a
commit
a526528de3
@ -503,7 +503,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