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

Ioi Lam ioi.lam at oracle.com
Tue Nov 28 18:51:10 UTC 2017



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);


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