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

Function main

test/defer-taskrun.c:335–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335int main(int argc, char *argv[])
336{
337 int ret;
338 const char *filename = NULL;
339
340 if (argc > 2)
341 return T_EXIT_SKIP;
342 if (argc == 2) {
343 /* This test exposes interesting behaviour with a null-blk
344 * device configured like:
345 * $ modprobe null-blk completion_nsec=100000000 irqmode=2
346 * and then run with $ defer-taskrun.t /dev/nullb0
347 */
348 filename = argv[1];
349 }
350
351 if (!t_probe_defer_taskrun())
352 return T_EXIT_SKIP;
353
354 ret = test_thread_shutdown();
355 if (ret) {
356 fprintf(stderr, "test_thread_shutdown failed\n");
357 return T_EXIT_FAIL;
358 }
359
360 ret = test_exec(filename);
361 if (ret == T_EXIT_FAIL) {
362 fprintf(stderr, "test_exec failed\n");
363 return T_EXIT_FAIL;
364 }
365
366 ret = test_eventfd();
367 if (ret) {
368 fprintf(stderr, "eventfd failed\n");
369 return T_EXIT_FAIL;
370 }
371
372 ret = test_flag();
373 if (ret) {
374 fprintf(stderr, "flag failed\n");
375 return T_EXIT_FAIL;
376 }
377
378 ret = test_ring_shutdown();
379 if (ret) {
380 fprintf(stderr, "test_ring_shutdown failed\n");
381 return T_EXIT_FAIL;
382 }
383
384 ret = test_drain();
385 if (ret) {
386 fprintf(stderr, "test_drain failed\n");
387 return T_EXIT_FAIL;
388 }
389
390 return T_EXIT_PASS;
391}

Callers

nothing calls this directly

Calls 7

t_probe_defer_taskrunFunction · 0.85
test_thread_shutdownFunction · 0.85
test_flagFunction · 0.85
test_ring_shutdownFunction · 0.85
test_execFunction · 0.70
test_eventfdFunction · 0.70
test_drainFunction · 0.70

Tested by

no test coverage detected