RFR[XS] 8191747 [TESTBUG] runtime/appcds/DumpClassList.java and ProhibitedPackage.java fail on product bits

Ioi Lam ioi.lam at oracle.com
Wed Nov 29 19:07:15 UTC 2017



On 11/29/17 12:02 AM, Volker Simonis wrote:
> On Tue, Nov 28, 2017 at 7:51 PM, Ioi Lam <ioi.lam at oracle.com> wrote:
>>
>> On 11/28/17 10:21 AM, Volker Simonis wrote:
>>> Hi Ioi,
>>>
>>> looks good!
>>>
>>> I was a little confused first that "-Xlog:cds" was not set as argument
>>> in ProhibitedPackage.java
>>> But I saw now that it is set by default in TestCommon for every
>>> invocation of "dump()". Maybe you could mention that in
>>> ProhibitedPackage.java in the comment before the execution of the dump
>>> where you parse the "[cds]" logs?
>> Hi Volker,
>>
>> Thanks for noticing this. I added -Xlog:cds unconditionally so if TestCommon
>> is changed in the future, this test will still work:
>>
>>               // Make sure a class in a prohibited package for a custom
>> loader
>>               // will be ignored during dumping.
>> -            TestCommon.dump(appJar,
>> -                            classlist,
>> - "-XX:+PrintSystemDictionaryAtExit")
>> +            TestCommon.dump(appJar,  classlist, "-Xlog:cds")
>>                   .shouldContain("Dumping")
>> -                .shouldNotContain("java.lang.Prohibited")
>> +                .shouldContain("[cds] Prohibited package for non-bootstrap
>> classes: java/lang/Prohibited.class")
>>                   .shouldHaveExitValue(0);
>>
>>
> Looks good. Thumbs up!
>
> I've just realized that the JBS entry for this bug is not publicly
> visible. Maybe you can also change that?
Done. I've changed the bug to be publicly visible.

Thanks
- Ioi
> Regards,
> Volker
>
>> Thanks
>> - Ioi
>>
>>
>>> Regards,
>>> Volker
>>>
>>>
>>> On Tue, Nov 28, 2017 at 6:58 PM, Ioi Lam <ioi.lam at oracle.com> wrote:
>>>> Hi,
>>>>
>>>> Here's a fix for these two tests failing in product builds. The fix is to
>>>> replace the use of debug flag PrintSystemDictionaryAtExit flag with
>>>> -Xlog:class+load, which is available in product builds:
>>>>
>>>> https://bugs.openjdk.java.net/browse/JDK-8191747
>>>>
>>>> http://cr.openjdk.java.net/~iklam/jdk10/8191747-avoid-PrintSystemDictionaryAtExit-in-tests.v01/
>>>>
>>>> Thanks
>>>> - Ioi
>>>>



More information about the hotspot-runtime-dev mailing list