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

Function test_io

test/fdinfo.c:282–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280 return 1;
281}
282static int test_io(const char *file, int write, int buffered, int sqthread,
283 int fixed, int nonvec, int exp_len, int mixed)
284{
285 struct io_uring ring;
286 int ret, ring_flags = 0, entries = 64;
287
288 if (sqthread)
289 ring_flags = IORING_SETUP_SQPOLL;
290 if (mixed) {
291 ring_flags |= IORING_SETUP_SQE_MIXED;
292 entries = 128;
293 }
294
295 ret = t_create_ring(entries, &ring, ring_flags);
296 if (ret == T_SETUP_SKIP)
297 return 0;
298 if (ret != T_SETUP_OK) {
299 fprintf(stderr, "ring create failed: %d\n", ret);
300 return 1;
301 }
302
303 ret = __test_io(file, &ring, write, buffered, sqthread, fixed, nonvec,
304 0, 0, exp_len, mixed);
305 io_uring_queue_exit(&ring);
306 return ret;
307}
308
309static int has_nonvec_read(void)
310{

Callers 1

mainFunction · 0.70

Calls 3

t_create_ringFunction · 0.85
io_uring_queue_exitFunction · 0.85
__test_ioFunction · 0.70

Tested by

no test coverage detected