tests: net: TCP Context needs to be listening before running accept
Change-Id: I433ddac41afcb055cd45e2e7fc4c26ed8c56e3c2 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
54af319833
commit
b52f8f1fa1
@ -1305,6 +1305,12 @@ static bool test_init_tcp_accept(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = net_context_listen(reply_v6_ctx, 0);
|
||||
if (ret) {
|
||||
TC_ERROR("Context listen v6 test failed (%d)\n", ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = net_context_accept(reply_v6_ctx, accept_v6_cb, 0,
|
||||
INT_TO_POINTER(AF_INET6));
|
||||
if (ret) {
|
||||
@ -1312,6 +1318,12 @@ static bool test_init_tcp_accept(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = net_context_listen(reply_v4_ctx, 0);
|
||||
if (ret) {
|
||||
TC_ERROR("Context listen v4 test failed (%d)\n", ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = net_context_accept(reply_v4_ctx, accept_v4_cb, 0,
|
||||
INT_TO_POINTER(AF_INET));
|
||||
if (ret) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user