RFR: JDK-8289146: containers/docker/TestMemoryWithCgroupV1.java fails on linux ppc64le machine with missing Memory and Swap Limit output

Ioi Lam iklam at openjdk.org
Thu Jun 30 15:00:36 UTC 2022


On Thu, 30 Jun 2022 07:22:18 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> test/hotspot/jtreg/containers/docker/TestMemoryWithCgroupV1.java line 94:
>> 
>>> 92:         } catch (RuntimeException ex) {
>>> 93:             out.shouldMatch("Memory and Swap Limit is: [0-9]+");
>>> 94:         }
>> 
>> With the `catch` clause added, it looks like the tests inside the `try` block don't do anything anymore, even on a host where the kernel actually supports swap limit capabilities.
>> 
>> Maybe the correct way to handle this is: if "Your kernel does not support memory swappiness capabilities or the cgroup is not mounted." is in the output, then skip the test inside the `try` block?
>
> Hi  Ioi, I think I proposed something like this (testing for the "Your kernel does not support memory swappiness" string) at other places in the test-code where the issue caused us trouble but this was not liked so much.

I don't know why that wasn't liked. Your patch essentially reduces `testMemoryLimitWithSwappiness` to test for only this:


out.shouldMatch("Memory and Swap Limit is: [0-9]+");


So if we go with this way, you may as well remove everything inside the `try` block.

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

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


More information about the hotspot-runtime-dev mailing list