| 1768 | } |
| 1769 | |
| 1770 | int main(int argc, char *argv[]) |
| 1771 | { |
| 1772 | struct io_uring ring, sqpoll_ring; |
| 1773 | bool has_timeout_update, sqpoll; |
| 1774 | struct io_uring_params p = { }; |
| 1775 | int ret; |
| 1776 | |
| 1777 | if (argc > 1) |
| 1778 | return 0; |
| 1779 | |
| 1780 | ret = io_uring_queue_init_params(8, &ring, &p); |
| 1781 | if (ret) { |
| 1782 | fprintf(stderr, "ring setup failed\n"); |
| 1783 | return 1; |
| 1784 | } |
| 1785 | |
| 1786 | ret = io_uring_queue_init(8, &sqpoll_ring, IORING_SETUP_SQPOLL); |
| 1787 | sqpoll = !ret; |
| 1788 | |
| 1789 | ret = test_single_timeout(&ring, false); |
| 1790 | if (ret) { |
| 1791 | fprintf(stderr, "test_single_timeout failed\n"); |
| 1792 | return ret; |
| 1793 | } |
| 1794 | if (not_supported) |
| 1795 | return 0; |
| 1796 | |
| 1797 | ret = test_single_timeout(&ring, true); |
| 1798 | if (ret) { |
| 1799 | fprintf(stderr, "test_single_timeout (imm) failed\n"); |
| 1800 | return ret; |
| 1801 | } |
| 1802 | |
| 1803 | ret = test_multi_timeout(&ring); |
| 1804 | if (ret) { |
| 1805 | fprintf(stderr, "test_multi_timeout failed\n"); |
| 1806 | return ret; |
| 1807 | } |
| 1808 | |
| 1809 | ret = test_single_timeout_abs(&ring, false); |
| 1810 | if (ret) { |
| 1811 | fprintf(stderr, "test_single_timeout_abs failed\n"); |
| 1812 | return ret; |
| 1813 | } |
| 1814 | |
| 1815 | if (!no_immediate) { |
| 1816 | ret = test_single_timeout_abs(&ring, true); |
| 1817 | if (ret) { |
| 1818 | fprintf(stderr, "test_single_timeout_abs (imm) failed\n"); |
| 1819 | return ret; |
| 1820 | } |
| 1821 | } |
| 1822 | |
| 1823 | ret = test_single_timeout_remove(&ring); |
| 1824 | if (ret) { |
| 1825 | fprintf(stderr, "test_single_timeout_remove failed\n"); |
| 1826 | return ret; |
| 1827 | } |
nothing calls this directly
no test coverage detected