Integrated: JDK-8327474 Review use of java.io.tmpdir in jdk tests
Bill Huang
bhuang at openjdk.org
Wed Apr 3 17:07:12 UTC 2024
On Mon, 18 Mar 2024 16:47:24 GMT, Bill Huang <bhuang at openjdk.org> wrote:
> This task addresses an essential aspect of our testing infrastructure: the proper handling and cleanup of temporary files and socket files created during test execution. The motivation behind these changes is to prevent the accumulation of unnecessary files in the default temporary directory, which can affect the system's storage and potentially influence subsequent test runs.
>
> Our review identified that several tests create temporary files or socket files without ensuring their removal post-execution.
> - Direct calls to java.io.File.createTempFile and java.nio.file.Files.createTempFile without adequate cleanup.
> - Tests using NIO socket channels with StandardProtocolFamily.UNIX, not explicitly removing socket files post-use.
This pull request has now been integrated.
Changeset: 375bfac8
Author: Bill Huang <bhuang at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/375bfac8e7ff3f871e2d986876f91a5fba200c83
Stats: 193 lines in 11 files changed: 66 ins; 13 del; 114 mod
8327474: Review use of java.io.tmpdir in jdk tests
Reviewed-by: michaelm, jpai
-------------
PR: https://git.openjdk.org/jdk/pull/18352
More information about the core-libs-dev
mailing list