> Hi everyone,
> 
> Many container tests verify that various resource limits work as expected. 
> However, when running containers in rootless mode on both Docker and Podman 
> with cgroup v1, resource limits are not supported. This causes tests to fail 
> with error messages like: `Resource limits are not supported and ignored on 
> cgroups V1 rootless systems`.
> 
> To address this, we should skip these tests when running on configurations 
> that don't support resource limits, similar to how we already handle other 
> unsupported configurations (e.g., missing container engine or incompatibility 
> with a specific cgroup version or container runtime).
> 
> To check for this, we now need to use `Metrics.systemMetrics().getProvider()` 
> from `jdk.internal.platform.Metrics` to detect cgroup v1. I've added this 
> functionality to `DockerTestUtils`, which is already used by all container 
> tests. As a result, all container tests now need to include the 
> `java.base/jdk.internal.platform` module, even if they don't directly test 
> resource limits.
> 
> Testing:
> * Oracle tiers 1-5
> * Local testing:
>   - `hotspot/jtreg/containers/` 
>   - `jdk/jdk/internal/platform/docker/`
> on cgroup v1/v2 with Podman and Docker in both rootful and rootless 
> configurations

Casper Norrbin has updated the pull request incrementally with one additional 
commit since the last revision:

  reworked check docker/resourcelimit functions

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28557/files
  - new: https://git.openjdk.org/jdk/pull/28557/files/e9297412..986b3923

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28557&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28557&range=00-01

  Stats: 112 lines in 27 files changed: 0 ins; 69 del; 43 mod
  Patch: https://git.openjdk.org/jdk/pull/28557.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28557/head:pull/28557

PR: https://git.openjdk.org/jdk/pull/28557

Reply via email to