Skip to content

Commit cb14306

Browse files
committed
test/io_uring_passthrough: ensure that fixed buffers are tested properly
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 <axboe@kernel.dk>
1 parent 7fa486a commit cb14306

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/io_uring_passthrough.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ static int __test_io(const char *file, struct io_uring *ring, int tc, int read,
167167
}
168168
}
169169
sqe->opcode = IORING_OP_URING_CMD;
170+
if (do_fixed)
171+
sqe->uring_cmd_flags |= IORING_URING_CMD_FIXED;
170172
sqe->user_data = ((uint64_t)offset << 32) | i;
171173
if (sqthread)
172174
sqe->flags |= IOSQE_FIXED_FILE;

0 commit comments

Comments
 (0)