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

Function run_setsockopt_test

test/socket-getsetsock-cmd.c:272–294  ·  view source on GitHub ↗

Test setsockopt() for SOL_SOCKET */

Source from the content-addressed store, hash-verified

270
271/* Test setsockopt() for SOL_SOCKET */
272static int run_setsockopt_test(struct io_uring *ring, struct fds *sockfds)
273{
274 int err, i;
275 int j;
276
277 for (j = 0; j < 2; j++) {
278 bool async = j & 1;
279
280 for (i = 0; i <= 1; i++) {
281 err = run_setsockopt_reuseport(ring, sockfds, i, async);
282 if (err)
283 return err;
284 }
285
286 for (i = 1; i <= 10; i++) {
287 err = run_setsockopt_usertimeout(ring, sockfds, i, async);
288 if (err)
289 return err;
290 }
291 }
292
293 return err;
294}
295
296/* Send data through the sockets */
297static void send_data(struct fds *s)

Callers 1

mainFunction · 0.85

Calls 2

run_setsockopt_reuseportFunction · 0.85

Tested by

no test coverage detected