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

Function test_accept_fixed

test/accept.c:676–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674}
675
676static int test_accept_fixed(void)
677{
678 struct io_uring m_io_uring;
679 int ret, fd = -1;
680 struct accept_test_args args = {
681 .fixed = true
682 };
683
684 ret = io_uring_queue_init(32, &m_io_uring, 0);
685 assert(ret >= 0);
686 ret = io_uring_register_files(&m_io_uring, &fd, 1);
687 if (ret) {
688 /* kernel doesn't support sparse registered files, skip */
689 if (ret == -EBADF || ret == -EINVAL)
690 return T_EXIT_SKIP;
691 return T_EXIT_FAIL;
692 }
693 ret = test(&m_io_uring, args);
694 io_uring_queue_exit(&m_io_uring);
695 return ret;
696}
697
698static int test_multishot_fixed_accept(void)
699{

Callers 1

mainFunction · 0.85

Calls 4

io_uring_queue_initFunction · 0.85
io_uring_register_filesFunction · 0.85
io_uring_queue_exitFunction · 0.85
testFunction · 0.70

Tested by

no test coverage detected