| 1141 | } |
| 1142 | |
| 1143 | int main(int argc, char *argv[]) |
| 1144 | { |
| 1145 | struct io_uring ring; |
| 1146 | int ret; |
| 1147 | |
| 1148 | if (argc > 1) |
| 1149 | return T_EXIT_SKIP; |
| 1150 | |
| 1151 | ret = io_uring_queue_init(8, &ring, 0); |
| 1152 | if (ret) { |
| 1153 | printf("ring setup failed\n"); |
| 1154 | return T_EXIT_FAIL; |
| 1155 | } |
| 1156 | |
| 1157 | ret = test_timeout_link_chain1(&ring); |
| 1158 | if (ret) { |
| 1159 | printf("test_single_link_chain1 failed\n"); |
| 1160 | return ret; |
| 1161 | } |
| 1162 | |
| 1163 | ret = test_timeout_link_chain2(&ring); |
| 1164 | if (ret) { |
| 1165 | printf("test_single_link_chain2 failed\n"); |
| 1166 | return ret; |
| 1167 | } |
| 1168 | |
| 1169 | ret = test_timeout_link_chain3(&ring); |
| 1170 | if (ret) { |
| 1171 | printf("test_single_link_chain3 failed\n"); |
| 1172 | return ret; |
| 1173 | } |
| 1174 | |
| 1175 | ret = test_timeout_link_chain4(&ring); |
| 1176 | if (ret) { |
| 1177 | printf("test_single_link_chain4 failed\n"); |
| 1178 | return ret; |
| 1179 | } |
| 1180 | |
| 1181 | ret = test_timeout_link_chain5(&ring); |
| 1182 | if (ret) { |
| 1183 | printf("test_single_link_chain5 failed\n"); |
| 1184 | return ret; |
| 1185 | } |
| 1186 | |
| 1187 | ret = test_single_link_timeout(&ring, 10); |
| 1188 | if (ret) { |
| 1189 | printf("test_single_link_timeout 10 failed\n"); |
| 1190 | return ret; |
| 1191 | } |
| 1192 | |
| 1193 | ret = test_single_link_timeout(&ring, 100000ULL); |
| 1194 | if (ret) { |
| 1195 | printf("test_single_link_timeout 100000 failed\n"); |
| 1196 | return ret; |
| 1197 | } |
| 1198 | |
| 1199 | ret = test_single_link_timeout(&ring, 500000000ULL); |
| 1200 | if (ret) { |
nothing calls this directly
no test coverage detected