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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hao Xu <howeyxu@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 test/accept.c | 2 ++
 1 file changed, 2 insertions(+)

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;
 }
 
-- 
2.36.0




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux