[jdk8u-dev] Integrated: 8377344: [8u] Compilation failure on Windows for Linux-specific platform metric tests

Takuya Kiriyama tkiriyama at openjdk.org
Tue Feb 10 11:49:42 UTC 2026


On Fri, 6 Feb 2026 07:05:19 GMT, Takuya Kiriyama <tkiriyama at openjdk.org> wrote:

> Hi All,
> 
> This fix addresses  cgroup and Docker test failures in JDK 8. In JDK 11 and later, these tests use `@requires container.support`. Docker support within the JDK's internal platform metrics inherently relies on Linux. This annotation prevents test execution in unsupported environments, such as Windows, thereby mitigating compilation errors stemming from absent Linux-specific libraries. While `@requires container.support` validates the presence and operational status of a container runtime or Docker daemon, it does not address the fundamental operating system compatibility required by the JDK's internal metric-reading code. The JDK's internal platform metrics for cgroups and Docker are intrinsically linked to and dependent upon Linux-specific APIs, including native libraries and system calls. However, the container.support determination logic is not implemented in JDK 8. Since Docker support inherently requires a Linux OS, directly adding `@requires os.family == "linux"` to tests in J
 DK 8 achieves the desired effect of preventing these tests from running (and thus failing compilation) on Windows. This is a practical and effective workaround for JDK 8, given the absence of container.support logic. This issue directly arises from modifications introduced by JDK-8231111, a critical bug fix enabling the JVM to natively process Cgroup v2 resource control files.
> 
> Would anyone review this fix, please?
> 
> Thank you.

This pull request has now been integrated.

Changeset: 37282092
Author:    Takuya Kiriyama <tkiriyama at openjdk.org>
Committer: Severin Gehwolf <sgehwolf at openjdk.org>
URL:       https://git.openjdk.org/jdk8u-dev/commit/372820924df3fa22840813501f2148db42a7a9cd
Stats:     6 lines in 3 files changed: 3 ins; 0 del; 3 mod

8377344: [8u] Compilation failure on Windows for Linux-specific platform metric tests

Reviewed-by: phh

-------------

PR: https://git.openjdk.org/jdk8u-dev/pull/758


More information about the jdk8u-dev mailing list