RFR: 8262953: [TESTBUG] Test /runtime/containers/cgroup/PlainRead.java fails if CPU quoata is not enabled

Severin Gehwolf sgehwolf at openjdk.java.net
Fri Apr 16 12:34:35 UTC 2021


On Thu, 25 Mar 2021 20:11:30 GMT, Anton Ostrouhhov <github.com+22177208+aostrouhhov at openjdk.org> wrote:

> Hello!
> Both _CPU Quota_ and _CPU Period_ are missing from output if kernel was built without `CONFIG_CFS_BANDWIDTH`.
> 
> This is my first contribution so please tell me if i am wrong somewhere.

Reading through the code it looks like OSCONTAINER_ERROR is probably being reported in this case. Thus, `Whitebox.printOsInfo()` should print `not supported` for the CPU files in question. Perhaps the test could use this call and look for a match on the relevant metric for "not supported" and don't perform the match in that case. @aostrouhhov FYI.

Alternatively, change the `GET_CONTAINER_INFO` macros to print trace messages for `OSCONTAINER_ERROR` cases and use that.

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

PR: https://git.openjdk.java.net/jdk/pull/3206


More information about the hotspot-runtime-dev mailing list