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>
This commit is contained in:
Hao Xu
2022-05-14 22:35:29 +08:00
committed by Jens Axboe
parent 3c0116cd32
commit c1e631310f
+2
View File
@@ -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;
}