| 223 | } |
| 224 | |
| 225 | int main(int argc, char *argv[]) |
| 226 | { |
| 227 | struct io_uring ring; |
| 228 | int ret; |
| 229 | |
| 230 | if (argc > 1) |
| 231 | return T_EXIT_SKIP; |
| 232 | |
| 233 | ret = io_uring_queue_init(QUEUE_SIZE, &ring, 0); |
| 234 | if (ret) { |
| 235 | fprintf(stderr, "ring setup failed\n"); |
| 236 | return T_EXIT_FAIL; |
| 237 | } |
| 238 | |
| 239 | for (int test = 0; test < 8; test++) { |
| 240 | int async = test & 0x01; |
| 241 | int write = test & 0x02; |
| 242 | int blocksize = test & 0x04 ? 1 : 7; |
| 243 | |
| 244 | ret = write |
| 245 | ? test_write(&ring, !!async, blocksize) |
| 246 | : test_read(&ring, !!async, blocksize); |
| 247 | if (ret) { |
| 248 | fprintf(stderr, "failed %s async=%d blocksize=%d\n", |
| 249 | write ? "write" : "read", |
| 250 | async, blocksize); |
| 251 | return -1; |
| 252 | } |
| 253 | } |
| 254 | return T_EXIT_PASS; |
| 255 | } |
nothing calls this directly
no test coverage detected