Thread (4 messages) 4 messages, 2 authors, 2021-08-24
STALE1798d

[PATCH liburing 1/2] tests: rw: don't exit ring when init failed

From: Pavel Begunkov <asml.silence@gmail.com>
Date: 2021-08-24 13:59:30
Subsystem: the rest · Maintainer: Linus Torvalds

Don't do io_uring_queue_exit() after t_create_ring() got skipped.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 test/iopoll.c     | 3 +--
 test/read-write.c | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/test/iopoll.c b/test/iopoll.c
index 5273279..7037c31 100644
--- a/test/iopoll.c
+++ b/test/iopoll.c
@@ -278,13 +278,12 @@ static int test_io(const char *file, int write, int sqthread, int fixed,
 
 	ret = t_create_ring(64, &ring, ring_flags);
 	if (ret == T_SETUP_SKIP)
-		goto done;
+		return 0;
 	if (ret != T_SETUP_OK) {
 		fprintf(stderr, "ring create failed: %d\n", ret);
 		return 1;
 	}
 	ret = __test_io(file, &ring, write, sqthread, fixed, buf_select);
-done:
 	io_uring_queue_exit(&ring);
 	return ret;
 }
diff --git a/test/read-write.c b/test/read-write.c
index 93f6803..1cfa2d5 100644
--- a/test/read-write.c
+++ b/test/read-write.c
@@ -242,7 +242,7 @@ static int test_io(const char *file, int write, int buffered, int sqthread,
 
 	ret = t_create_ring(64, &ring, ring_flags);
 	if (ret == T_SETUP_SKIP)
-		goto done;
+		return 0;
 	if (ret != T_SETUP_OK) {
 		fprintf(stderr, "ring create failed: %d\n", ret);
 		return 1;
@@ -250,8 +250,6 @@ static int test_io(const char *file, int write, int buffered, int sqthread,
 
 	ret = __test_io(file, &ring, write, buffered, sqthread, fixed, nonvec,
 			0, 0, exp_len);
-
-done:
 	io_uring_queue_exit(&ring);
 	return ret;
 }
-- 
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help