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.
@@ -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];
