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

Function check_tee

test/splice.c:337–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337static int check_tee(struct io_uring *ring, struct test_ctx *ctx)
338{
339 int ret;
340
341 ret = write_buf(ctx->real_pipe1[1], ctx->buf_in, BUF_SIZE);
342 if (ret)
343 return ret;
344 ret = do_tee(ring, ctx->pipe1[0], ctx->pipe2[1], BUF_SIZE);
345 if (ret)
346 return ret;
347
348 ret = check_content(ctx->real_pipe1[0], ctx->buf_out, BUF_SIZE,
349 ctx->buf_in);
350 if (ret) {
351 fprintf(stderr, "tee(), invalid src data\n");
352 return ret;
353 }
354
355 ret = check_content(ctx->real_pipe2[0], ctx->buf_out, BUF_SIZE,
356 ctx->buf_in);
357 if (ret) {
358 fprintf(stderr, "tee(), invalid dst data\n");
359 return ret;
360 }
361
362 return 0;
363}
364
365static int check_zero_tee(struct io_uring *ring, struct test_ctx *ctx)
366{

Callers 1

test_spliceFunction · 0.85

Calls 3

write_bufFunction · 0.85
do_teeFunction · 0.85
check_contentFunction · 0.85

Tested by 1

test_spliceFunction · 0.68