summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHao Xu <howeyxu@tencent.com>2022-05-14 22:35:29 +0800
committerJens Axboe <axboe@kernel.dk>2022-05-14 09:15:38 -0600
commit19b0d25193330d3cfcd636d4cc2e4ec1ec019271 (patch)
tree126529c1c6f16aaa325d0288f3e39c6a57e55ae6
parente597622672fcfdab486337b5a80be49cfe25a99c (diff)
downloadliburing-19b0d25193330d3cfcd636d4cc2e4ec1ec019271.tar.gz
liburing-19b0d25193330d3cfcd636d4cc2e4ec1ec019271.tar.bz2
test/accept.c: close the listen fd at the end of the test
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> Link: https://lore.kernel.org/r/20220514143534.59162-2-haoxu.linux@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/accept.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/accept.c b/test/accept.c
index c591e76..a0f4a13 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;
}