diff options
author | Hao Xu <howeyxu@tencent.com> | 2022-05-14 22:35:29 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-05-14 09:15:38 -0600 |
commit | 19b0d25193330d3cfcd636d4cc2e4ec1ec019271 (patch) | |
tree | 126529c1c6f16aaa325d0288f3e39c6a57e55ae6 | |
parent | e597622672fcfdab486337b5a80be49cfe25a99c (diff) | |
download | liburing-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.c | 2 |
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; } |