MCPcopy Create free account
hub / github.com/axboe/liburing / main

Function main

test/file-update.c:189–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189int main(int argc, char *argv[])
190{
191 struct io_uring r1, r2, r3;
192 int ret;
193
194 if (argc > 1)
195 return T_EXIT_SKIP;
196
197 if (io_uring_queue_init(8, &r1, 0) ||
198 io_uring_queue_init(8, &r2, 0) ||
199 io_uring_queue_init(8, &r3, 0)) {
200 fprintf(stderr, "ring setup failed\n");
201 return 1;
202 }
203
204 ret = test_update_multiring(&r1, &r2, &r3, 1);
205 if (ret) {
206 fprintf(stderr, "test_update_multiring w/unreg\n");
207 return ret;
208 }
209
210 ret = test_update_multiring(&r1, &r2, &r3, 0);
211 if (ret) {
212 fprintf(stderr, "test_update_multiring wo/unreg\n");
213 return ret;
214 }
215
216 ret = test_sqe_update(&r1);
217 if (ret) {
218 if (ret != T_EXIT_SKIP)
219 fprintf(stderr, "test_sqe_update failed\n");
220 return ret;
221 }
222
223 ret = test_update_no_table();
224 if (ret) {
225 if (ret != T_EXIT_SKIP)
226 fprintf(stderr, "test_sqe_update failed\n");
227 return ret;
228 }
229
230 return T_EXIT_PASS;
231}

Callers

nothing calls this directly

Calls 4

io_uring_queue_initFunction · 0.85
test_update_multiringFunction · 0.85
test_sqe_updateFunction · 0.85
test_update_no_tableFunction · 0.85

Tested by

no test coverage detected