diff mbox series

[liburing,2/8] test/reg-wait: pass right timeout indexes

Message ID 4a64eff75fbdd1fc93e1683f5b8b0f58794e27fe.1731792294.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series region test fixes + improvements | expand

Commit Message

Pavel Begunkov Nov. 16, 2024, 9:27 p.m. UTC
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 test/reg-wait.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/reg-wait.c b/test/reg-wait.c
index eef10e0..ec90019 100644
--- a/test/reg-wait.c
+++ b/test/reg-wait.c
@@ -72,10 +72,11 @@  static int test_offsets(struct io_uring *ring)
 
 	rw = reg + max_index;
 	memset(rw, 0, sizeof(*rw));
+	rw->flags = IORING_REG_WAIT_TS;
 	rw->ts.tv_sec = 0;
 	rw->ts.tv_nsec = 1000;
 
-	ret = io_uring_submit_and_wait_reg(ring, &cqe, 1, 0);
+	ret = io_uring_submit_and_wait_reg(ring, &cqe, 1, max_index);
 	if (ret != -EFAULT) {
 		fprintf(stderr, "max+1 index failed: %d\n", ret);
 		return T_EXIT_FAIL;