On Thu, 17 Mar 2022 13:40:53 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:
> Please review this container test improvement. The test in question only > makes sense iff the total swap space size as reported by the container aware > OperatingSystemMXBean is `0`. If that's not the case, then something else > might be amiss, e.g. OperatingSystemMXBean reporting the host swap limits. In > such a case a passing test tells us nothing. Certainly not if the > fix from [JDK-8242480](https://bugs.openjdk.java.net/browse/JDK-8242480) is > present or not. > > Testing: > - [x] Manual with and without the code fix of JDK-8242480. Still passes with > the fix, and fails without. Tested the test on cgroups v1 and cgroups v2. Please also update the copyright year. Thanks. test/jdk/jdk/internal/platform/docker/GetFreeSwapSpaceSize.java line 28: > 26: > 27: // Usage: > 28: // GetFreeSwapSpaceSize <memoryAlloc> <memory> <memorySwapAlloc> > <expectedSwap> I would suggest // GetFreeSwapSpaceSize <memoryAlloc> <expectedMemory> <memorySwapAlloc> <expectedSwap> test/jdk/jdk/internal/platform/docker/GetFreeSwapSpaceSize.java line 32: > 30: public static void main(String[] args) { > 31: if (args.length != 4) { > 32: throw new RuntimeException("Unexpected arguments. Expected 2, > got " + args.length); Shouldn't be `Expected 4` ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7854