MCPcopy Create free account
hub / github.com/axboe/liburing / test

Function test

test/accept.c:374–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374static int test(struct io_uring *ring, struct accept_test_args args)
375{
376 struct sockaddr_in addr;
377 int ret = 0;
378 int loop;
379 int32_t recv_s0 = start_accept_listen(&addr, 0,
380 args.nonblock ? SOCK_NONBLOCK : 0);
381 if (args.queue_accept_before_connect)
382 queue_accept_conn(ring, recv_s0, args);
383 for (loop = 0; loop < 1 + args.extra_loops; loop++) {
384 ret = test_loop(ring, args, recv_s0, &addr);
385 if (ret)
386 break;
387 }
388
389 close(recv_s0);
390 return ret;
391}
392
393static void sig_alrm(int sig)
394{

Callers 6

test_acceptFunction · 0.70
test_multishot_acceptFunction · 0.70
test_accept_nonblockFunction · 0.70
test_accept_fixedFunction · 0.70
test_accept_sqpollFunction · 0.70

Calls 3

queue_accept_connFunction · 0.85
test_loopFunction · 0.85
start_accept_listenFunction · 0.70

Tested by 6

test_acceptFunction · 0.56
test_multishot_acceptFunction · 0.56
test_accept_nonblockFunction · 0.56
test_accept_fixedFunction · 0.56
test_accept_sqpollFunction · 0.56