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

Function main

test/socket-getsetsock-cmd.c:305–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305int main(int argc, char *argv[])
306{
307 struct fds sockfds;
308 struct io_uring ring;
309 int err;
310
311 if (argc > 1)
312 return T_EXIT_SKIP;
313
314 /* Simply io_uring ring creation */
315 ring = create_ring();
316
317 /* Create sockets */
318 sockfds = create_sockets();
319
320 send_data(&sockfds);
321
322 err = run_getsockopt_test(&ring, &sockfds);
323 if (err) {
324 if (err == T_EXIT_SKIP) {
325 fprintf(stderr, "Skipping tests.\n");
326 return T_EXIT_SKIP;
327 }
328 fprintf(stderr, "Failed to run test: %d\n", err);
329 return err;
330 }
331 if (no_sock_opt)
332 return T_EXIT_SKIP;
333
334 err = run_setsockopt_test(&ring, &sockfds);
335 if (err) {
336 if (err == T_EXIT_SKIP) {
337 fprintf(stderr, "Skipping tests.\n");
338 return T_EXIT_SKIP;
339 }
340 fprintf(stderr, "Failed to run test: %d\n", err);
341 return err;
342 }
343
344 io_uring_queue_exit(&ring);
345 return err;
346}

Callers

nothing calls this directly

Calls 6

create_ringFunction · 0.85
run_getsockopt_testFunction · 0.85
run_setsockopt_testFunction · 0.85
io_uring_queue_exitFunction · 0.85
create_socketsFunction · 0.70
send_dataFunction · 0.70

Tested by

no test coverage detected