summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-10-07 13:53:01 -0600
committerJens Axboe <axboe@kernel.dk>2019-10-07 13:53:01 -0600
commit5db5a2c041e145d334b1c8a357d457690d57a674 (patch)
tree8b1aa62f610eca7180c1ca1dba133302f53dd638
parent990f34d048a5b7a7bf0be0f77873740da64c2914 (diff)
downloadliburing-5db5a2c041e145d334b1c8a357d457690d57a674.tar.gz
liburing-5db5a2c041e145d334b1c8a357d457690d57a674.tar.bz2
test/file-register: catch succeeding with too many fds
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/file-register.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/file-register.c b/test/file-register.c
index 322545f..91cb3cc 100644
--- a/test/file-register.c
+++ b/test/file-register.c
@@ -126,6 +126,10 @@ static int test_grow(struct io_uring *ring)
printf("ret=%d, errno=%d\n", ret, errno);
break;
}
+ if (off >= 300) {
+ printf("Succeeded beyond end-of-list?\n");
+ goto err;
+ }
off++;
} while (1);