RFR [XS]: 8239537: cgroup MetricsTester testMemorySubsystem fails sometimes when testing memory.kmem.tcp.usage_in_bytes

Baesken, Matthias matthias.baesken at sap.com
Thu Feb 20 10:25:24 UTC 2020


Hello, please review this small adjustment .

The testMemorySubsystem test in MetricsTester.java sometimes fails with messages like this :

java.lang.RuntimeException: Test failed for - memory:memory.kmem.tcp.usage_in_bytes, expected [655360], got [786432]
                at jdk.test.lib.containers.cgroup.MetricsTester.fail(MetricsTester.java:207)
                at jdk.test.lib.containers.cgroup.MetricsTester.testMemorySubsystem(MetricsTester.java:309)

I looked into the  code doing the checks , and looks like there is already  an error margin allowed in CgroupMetricsTester.java , which is currently 0.1 .
This might be changed to a somewhat higher value, e.g. 0.25 to make the test more robust.


Bug/webrev :

https://bugs.openjdk.java.net/browse/JDK-8239537

http://cr.openjdk.java.net/~mbaesken/webrevs/8239537.0/

Thanks, Matthias


More information about the hotspot-dev mailing list