RFR 8085919: OperatingSystemMXBean/TestTotalSwap.java failure : Total Swap Space figures mismatch
Jaroslav Bachorik
jaroslav.bachorik at oracle.com
Tue Aug 4 07:10:21 UTC 2015
Hi David,
On 4.8.2015 02:25, David Holmes wrote:
> On 4/08/2015 1:31 AM, Jaroslav Bachorik wrote:
>> Please, review the following test change
>>
>> Issue : https://bugs.openjdk.java.net/browse/JDK-8085919
>> Webrev: http://cr.openjdk.java.net/~jbachorik/8085919/webrev.00
>>
>> The test fails on embedded machines with 'yocto' flavour of OS
>> installed. For some reason the 'free -b' command ignores the request to
>> report sizes in bytes and does report in kilobytes.
>>
>> I've changed the test to expect this behaviour (when the OS version
>> string contains 'yocto') and in case the expected and reported total
>> swap size are different to try conversion from kilobytes to bytes and
>> check again.
>
> Seems okay. I would have tweaked this:
>
> long expected_swap_size = getSwapSizeFromOs();
>
> to
>
> long expected_swap_size = getSwapSizeFromOs() * (SwapInKB ? 1024
> : 1);
I thought about this - but doing just this the test would start failing
the minute they fix the 'free' tool in yocto linux distribution :/
-JB-
>
> Cheers,
> David
>
>> Thanks,
>>
>> -JB-
More information about the serviceability-dev
mailing list