summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-12-23 09:47:41 -0700
committerJens Axboe <axboe@kernel.dk>2021-12-23 09:47:41 -0700
commit515e03ef1a82e1b866209756bb18bea053988c9d (patch)
treef937b0c3fe78571d6200b42df2c6e386ef00a3a9
parent03be3e4fbddd491ef0426b6f9c9085a168acc1c4 (diff)
downloadliburing-515e03ef1a82e1b866209756bb18bea053988c9d.tar.gz
liburing-515e03ef1a82e1b866209756bb18bea053988c9d.tar.bz2
test/socket-rw-offset: skip for kernels without cur position rw
This will fail on kernels that don't have IORING_FEAT_RW_CUR_POS, so just skip the test if we are running on one of those. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/socket-rw-offset.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/socket-rw-offset.c b/test/socket-rw-offset.c
index d44dd8c..fe6ace3 100644
--- a/test/socket-rw-offset.c
+++ b/test/socket-rw-offset.c
@@ -95,10 +95,15 @@ int main(int argc, char *argv[])
}
struct io_uring m_io_uring;
+ struct io_uring_params p = { };
- ret = io_uring_queue_init(32, &m_io_uring, 0);
+ ret = io_uring_queue_init_params(32, &m_io_uring, &p);
assert(ret >= 0);
+ /* skip for kernels without cur position read/write */
+ if (!(p.features & IORING_FEAT_RW_CUR_POS))
+ return 0;
+
char recv_buff[128];
char send_buff[128];