Skip to content

Commit

Permalink
test/no-mmap-inval: use io_uring_queue_init_params()
Browse files Browse the repository at this point in the history
This is the provided helper, forgot that when turning the test case into
a liburing regression test.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Oct 18, 2023
1 parent 5cbc1d8 commit e307076
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/no-mmap-inval.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ int main(int argc, char *argv[])
.cq_entries = 4,
.flags = IORING_SETUP_NO_MMAP,
};
struct io_uring ring;
int ret;

if (argc > 1)
return T_EXIT_SKIP;

p.cq_off.user_addr = (unsigned long long) (uintptr_t) valloc(8192);

ret = io_uring_setup(2, &p);
ret = io_uring_queue_init_params(2, &ring, &p);
if (ret == -EINVAL) {
/* kernel doesn't support SETUP_NO_MMAP */
return T_EXIT_SKIP;
Expand Down

0 comments on commit e307076

Please sign in to comment.