RFR [XS]: 8244500: jtreg test error in test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java
David Holmes
david.holmes at oracle.com
Thu May 14 05:02:04 UTC 2020
On 14/05/2020 12:28 am, Baesken, Matthias wrote:
> Hello, here is a new webrev removing the comment :
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8244500.1/
>
> It removes the comment , and it also handles 0 for getFreeSwapSpaceSize
> ( this can occur after JDK-8242480 : Negative value may be returned by getFreeSwapSpaceSize() in the docker was pushed recently ).
Sorry Matthias but I still see this partly as a bug in the underlying
container support code. If you get the warning then what does
getTotalSwapSpaceSize() return? Surely it must be specified to return 0
or some such sentinel in such a case?
Other comments:
! try {
!
out.shouldMatch("OperatingSystemMXBean\\.getFreeSwapSpaceSize:
[1-9][0-9]+");
! } catch(RuntimeException ex) { // allow 0, see 8242480
!
out.shouldContain("OperatingSystemMXBean.getFreeSwapSpaceSize: 0");
! }
can't you just change the original regex to match >= 0?
Style nit: avoid historical comments like "see 8242480" and "since
8231111 ...".
Thanks,
David
> Best regards, Matthias
>
> -----Original Message-----
> From: Baesken, Matthias
> Sent: Mittwoch, 13. Mai 2020 10:11
> To: 'David Holmes' <david.holmes at oracle.com>; 'hotspot-dev at openjdk.java.net' <hotspot-dev at openjdk.java.net>
> Subject: RE: RFR [XS]: 8244500: jtreg test error in test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java
>
>
>> But according to the comment immediately before your changes:
>>
>> // in case of warnings like : "Your kernel does not support swap limit
>> capabilities or the cgroup is not mounted. Memory limited without swap."
>> // the getTotalSwapSpaceSize does not return the expected result, but 0
>>
>> we should be returning zero. So this seems to be a bug in the
>> implementation not in the test.
>
>
> Hi David , I think in case of "Your kernel does not support swap limit capabilities ... " we just do not get the values
> that are normally expected.
> Previously we indeed got "0" .
> Probably the comment should be deleted .
>
> Best regards, Matthias
>
More information about the hotspot-dev
mailing list