Skip to content

Commit

Permalink
test/io_uring_passthrough: ensure that fixed buffers are tested properly
Browse files Browse the repository at this point in the history
The test forgets to set IORING_URING_CMD_FIXED, which means that the
registered/fixed buffer part of the test isn't exercised at all. Ensure
the flag is set so that the test is actually testing what it should be
testing.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Oct 22, 2024
1 parent 7fa486a commit cb14306
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/io_uring_passthrough.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ static int __test_io(const char *file, struct io_uring *ring, int tc, int read,
}
}
sqe->opcode = IORING_OP_URING_CMD;
if (do_fixed)
sqe->uring_cmd_flags |= IORING_URING_CMD_FIXED;
sqe->user_data = ((uint64_t)offset << 32) | i;
if (sqthread)
sqe->flags |= IOSQE_FIXED_FILE;
Expand Down

0 comments on commit cb14306

Please sign in to comment.