| 33 | #define IORING_MAX_ENTRIES_FALLBACK 128 |
| 34 | |
| 35 | static int expect_fail(int fd, unsigned int to_submit, |
| 36 | unsigned int min_complete, unsigned int flags, |
| 37 | sigset_t *sig, int error) |
| 38 | { |
| 39 | int ret; |
| 40 | |
| 41 | ret = io_uring_enter(fd, to_submit, min_complete, flags, sig); |
| 42 | if (ret >= 0) { |
| 43 | fprintf(stderr, "expected %s, but call succeeded\n", strerror(-error)); |
| 44 | return 1; |
| 45 | } |
| 46 | |
| 47 | if (ret != error) { |
| 48 | fprintf(stderr, "expected %d, got %d\n", error, ret); |
| 49 | return 1; |
| 50 | } |
| 51 | |
| 52 | return 0; |
| 53 | } |
| 54 | |
| 55 | static int try_io_uring_enter(int fd, unsigned int to_submit, |
| 56 | unsigned int min_complete, unsigned int flags, |
no test coverage detected