RFR: 8360533: ContainerRuntimeVersionTestUtils fromVersionString fails with some docker versions

Severin Gehwolf sgehwolf at openjdk.org
Thu Jun 26 14:28:28 UTC 2025


On Thu, 26 Jun 2025 09:27:20 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> On Linux ppc64le RHEL 8, we have such a docker version :
> 
> docker --version
> Docker version v25.0.3, build 4debf41
> 
> 
> Unfortunately, the leading 'v' is not expected in ContainerRuntimeVersionTestUtils fromVersionString so we get an exception.
> 
> Probably we should simply skip the leading 'v' .
> Also the appended build info has to be considered.
> 
> Example failure
> 
> TEST: jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java
> TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Failed to parse container runtime version: Docker version v25.0.3, build 4debf41

test/lib/jdk/test/lib/containers/docker/ContainerRuntimeVersionTestUtils.java line 83:

> 81:             String versNums = version.split("\\s+", 3)[2];
> 82:             // On some docker implementations e.g. RHEL8 ppc64le we have a version v25.0.3
> 83:             // with a leading v, skip this

Suggestion:

            // On some docker implementations e.g. RHEL8 ppc64le we have the following version output:
            //    Docker version v25.0.3, build 4debf41
            // Trim potentially leading 'v' and trailing ','

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25996#discussion_r2169206063


More information about the hotspot-runtime-dev mailing list