diff mbox series

[1/6] test/accept.c: close the listen fd at the end of the test

Message ID 20220514143534.59162-2-haoxu.linux@gmail.com (mailing list archive)
State New
Headers show
Series liburing changes for multishot accept | expand

Commit Message

Hao Xu May 14, 2022, 2:35 p.m. UTC
From: Hao Xu <howeyxu@tencent.com>

Close the listen fd when it goes to the end, otherwise it may causes
issues for the next tests

Signed-off-by: Hao Xu <howeyxu@tencent.com>
---
 test/accept.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/test/accept.c b/test/accept.c
index c591e761b43b..a0f4a13f5975 100644
--- a/test/accept.c
+++ b/test/accept.c
@@ -425,9 +425,11 @@  static int test_accept_cancel(unsigned usecs, unsigned int nr)
 	}
 
 	io_uring_queue_exit(&m_io_uring);
+	close(fd);
 	return 0;
 err:
 	io_uring_queue_exit(&m_io_uring);
+	close(fd);
 	return 1;
 }