| 280 | return 1; |
| 281 | } |
| 282 | static 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 | |
| 309 | static int has_nonvec_read(void) |
| 310 | { |
no test coverage detected