diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-06-04 10:46:51 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-06-04 10:46:51 -0600 |
commit | ef9c4b40f7b42ebfd555c2e0cd0c30c7308a2300 (patch) | |
tree | acc775cdaf0de43dbcad32b19f1a7009e715a15e | |
parent | fb34ae6d37f45543971b83208d436890fe95f643 (diff) |
test/io_uring_register: don't test buffer size if too large
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | test/io_uring_register.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/io_uring_register.c b/test/io_uring_register.c index 7adf563..070d0ff 100644 --- a/test/io_uring_register.c +++ b/test/io_uring_register.c @@ -231,6 +231,10 @@ test_memlock_exceeded(int fd) void *buf; struct iovec iov; + /* if limit is larger than 2gb, just skip this test */ + if (mlock_limit >= 2 * 1024 * 1024 * 1024ULL) + return 0; + iov.iov_len = mlock_limit * 2; buf = malloc(iov.iov_len); assert(buf); |