RFR: 8262953: [TESTBUG] Test /runtime/containers/cgroup/PlainRead.java fails if CPU quoata is not enabled
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Fri Apr 16 13:08:33 UTC 2021
On Fri, 16 Apr 2021 09:43:24 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
> > I agree with David, I think we should throw SkipException in this case.
> > OTOH this test can catch incorrect behavior if HotSpot could not get CPU related values from cgroups even if `CONFIG_CFS_BANDWIDTH` is configured.
>
> Did you perhaps mean that post-patch the test would actually (wrongly) pass on a system with a broken implementation of CPU quota/period support in the container detection code? If so, I agree and, thus, don't like this suggested fix for that reason.
Yes, sorry for my English ♂️
> > So I suggest to check `/boot/config-<kernel version>` in start of the test rather than throwing SkipException. If we cannot see `CONFIG_CFS_BANDWIDTH=y` in it, then we can throw SkipException.
>
> This suggestion depends on `/boot/config-$(uname -r)` being installed on the system under test. If it isn't, you're non the wiser and have to assume something.
I can see config file in Fedora, Alpine, and Ubuntu. In case of Fedora, it is provided by kernel-core package. so I guess most of Linux distros are providing it. If so, I think we can throw SkipException when the test cannot find it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3206
More information about the hotspot-runtime-dev
mailing list