test/cq-overflow-peek: skip for !NODROP
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/test/cq-overflow-peek.c b/test/cq-overflow-peek.c
index 72b6768..353c6f3 100644
--- a/test/cq-overflow-peek.c
+++ b/test/cq-overflow-peek.c
@@ -62,16 +62,22 @@
{
int ret;
struct io_uring ring;
+ struct io_uring_params p = { };
if (argc > 1)
return 0;
- ret = io_uring_queue_init(16, &ring, 0);
+ ret = io_uring_queue_init_params(16, &ring, &p);
if (ret) {
fprintf(stderr, "ring setup failed: %d\n", ret);
return 1;
}
+ if (!(p.features & IORING_FEAT_NODROP)) {
+ fprintf(stdout, "No overflow protection, skipped\n");
+ return 0;
+ }
+
ret = test_cq_overflow(&ring);
if (ret) {
fprintf(stderr, "test_cq_overflow failed\n");