| 53 | } |
| 54 | |
| 55 | static int try_io_uring_enter(int fd, unsigned int to_submit, |
| 56 | unsigned int min_complete, unsigned int flags, |
| 57 | sigset_t *sig, int expect) |
| 58 | { |
| 59 | int ret; |
| 60 | |
| 61 | if (expect < 0) |
| 62 | return expect_fail(fd, to_submit, min_complete, flags, sig, |
| 63 | expect); |
| 64 | |
| 65 | ret = io_uring_enter(fd, to_submit, min_complete, flags, sig); |
| 66 | if (ret != expect) { |
| 67 | fprintf(stderr, "Expected %d, got %d\n", expect, ret); |
| 68 | return 1; |
| 69 | } |
| 70 | |
| 71 | return 0; |
| 72 | } |
| 73 | |
| 74 | /* |
| 75 | * prep a read I/O. index is treated like a block number. |
no test coverage detected