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

Function main

test/vec-regbuf.c:705–742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705int main(int argc, char *argv[])
706{
707 struct buf_desc bd = {};
708 int ret, i;
709
710 if (argc > 1)
711 return T_EXIT_SKIP;
712
713 page_sz = sysconf(_SC_PAGESIZE);
714
715 probe_support();
716 if (!has_regvec) {
717 printf("doesn't support registered vector ops, skip\n");
718 return T_EXIT_SKIP;
719 }
720
721 init_buffers(&bd, page_sz * 32);
722 bd.fixed = true;
723
724 for (i = 0; i < 2; i++) {
725 bool rw = i & 1;
726
727 bd.rw = rw;
728
729 test_basic(&bd);
730 test_fail(&bd);
731 }
732
733 ret = test_readv(&bd);
734 if (ret) {
735 fprintf(stderr, "test_readv failed\n");
736 return T_EXIT_FAIL;
737 }
738
739 free(bd.buf_rd);
740 io_uring_queue_exit(&bd.ring);
741 return 0;
742}

Callers

nothing calls this directly

Calls 6

probe_supportFunction · 0.85
test_failFunction · 0.85
test_readvFunction · 0.85
io_uring_queue_exitFunction · 0.85
init_buffersFunction · 0.70
test_basicFunction · 0.70

Tested by

no test coverage detected