io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: [PATCH liburing 1/2] tests: close pipes in link-timeout
Date: Sun, 15 Aug 2021 10:43:51 +0100	[thread overview]
Message-ID: <02771d9c5820fa0fa2fc87f697f0f232b9b23a0d.1629020550.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1629020550.git.asml.silence@gmail.com>

Don't forget to close pipe fds after link-timeout tests

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 test/link-timeout.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/link-timeout.c b/test/link-timeout.c
index 5d8417f..8c3e203 100644
--- a/test/link-timeout.c
+++ b/test/link-timeout.c
@@ -619,6 +619,8 @@ static int test_timeout_link_chain1(struct io_uring *ring)
 		io_uring_cqe_seen(ring, cqe);
 	}
 
+	close(fds[0]);
+	close(fds[1]);
 	return 0;
 err:
 	return 1;
@@ -713,6 +715,8 @@ static int test_timeout_link_chain2(struct io_uring *ring)
 		io_uring_cqe_seen(ring, cqe);
 	}
 
+	close(fds[0]);
+	close(fds[1]);
 	return 0;
 err:
 	return 1;
@@ -833,6 +837,8 @@ static int test_timeout_link_chain3(struct io_uring *ring)
 		io_uring_cqe_seen(ring, cqe);
 	}
 
+	close(fds[0]);
+	close(fds[1]);
 	return 0;
 err:
 	return 1;
@@ -917,6 +923,8 @@ static int test_timeout_link_chain4(struct io_uring *ring)
 		io_uring_cqe_seen(ring, cqe);
 	}
 
+	close(fds[0]);
+	close(fds[1]);
 	return 0;
 err:
 	return 1;
-- 
2.32.0


  reply	other threads:[~2021-08-15  9:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15  9:43 [PATCH liburing 0/2] update linked timeout tests Pavel Begunkov
2021-08-15  9:43 ` Pavel Begunkov [this message]
2021-08-15  9:43 ` [PATCH liburing 2/2] tests: fail early invalid linked setups Pavel Begunkov
2021-08-15 15:15 ` [PATCH liburing 0/2] update linked timeout tests 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=02771d9c5820fa0fa2fc87f697f0f232b9b23a0d.1629020550.git.asml.silence@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).