RFR(trivial): 8232593: [TESTBUG] runtime/cds/CheckDefaultArchiveFile.java fails when cds is disabled

Ioi Lam ioi.lam at oracle.com
Fri Oct 18 07:05:30 UTC 2019

On 10/17/19 11:29 PM, David Holmes wrote:
> Hi Jie,
> On 18/10/2019 4:24 pm, Jie Fu wrote:
>> Hi all,
>> May I get reviews for this one-line fix?
>> JBS:    https://bugs.openjdk.java.net/browse/JDK-8232593
>> Webrev: http://cr.openjdk.java.net/~jiefu/8232593/webrev.00/
>> This bug was found while we were debugging the cds feature on mips.
>> When cds was disabled, only this one failed under 
>> hotspot/jtreg/runtime/cds.
>> So it might be better to fix it.
> CDS folk may have to jump in here as I would have thought the fix here 
> is to ensure that Platform.isDefaultCDSArchiveSupported() returns false ?
> David
I think the proposed fix is good.

The problem with Platform.isDefaultCDSArchiveSupported() is that it has 
no easy way of determining whether CDS is enabled for the build (which 
requires a WhiteBox call, which is not always available when a test is 
executed with @run).

"@requires vm.cds" allows us to filter a test out, without having to use 
WhiteBox inside the test itself.

- Ioi

More information about the hotspot-runtime-dev mailing list