public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 1/2] tests: rw: don't exit ring when init failed
Date: Tue, 24 Aug 2021 14:57:51 +0100	[thread overview]
Message-ID: <28376af76af7bfb9059b6b9ad3a01eb0b07e7244.1629813328.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

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

Signed-off-by: Pavel Begunkov <[email protected]>
---
 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


  reply	other threads:[~2021-08-24 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 13:57 [PATCH liburing 0/2] non-root fixes Pavel Begunkov
2021-08-24 13:57 ` Pavel Begunkov [this message]
2021-08-24 13:57 ` [PATCH liburing 2/2] tests: non-root io_uring_register Pavel Begunkov
2021-08-24 14:07 ` [PATCH liburing 0/2] non-root fixes Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28376af76af7bfb9059b6b9ad3a01eb0b07e7244.1629813328.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox