| 674 | } |
| 675 | |
| 676 | static int test_accept_fixed(void) |
| 677 | { |
| 678 | struct io_uring m_io_uring; |
| 679 | int ret, fd = -1; |
| 680 | struct accept_test_args args = { |
| 681 | .fixed = true |
| 682 | }; |
| 683 | |
| 684 | ret = io_uring_queue_init(32, &m_io_uring, 0); |
| 685 | assert(ret >= 0); |
| 686 | ret = io_uring_register_files(&m_io_uring, &fd, 1); |
| 687 | if (ret) { |
| 688 | /* kernel doesn't support sparse registered files, skip */ |
| 689 | if (ret == -EBADF || ret == -EINVAL) |
| 690 | return T_EXIT_SKIP; |
| 691 | return T_EXIT_FAIL; |
| 692 | } |
| 693 | ret = test(&m_io_uring, args); |
| 694 | io_uring_queue_exit(&m_io_uring); |
| 695 | return ret; |
| 696 | } |
| 697 | |
| 698 | static int test_multishot_fixed_accept(void) |
| 699 | { |
no test coverage detected