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

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Ioi Lam
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

Reply | Threaded
Open this post in threaded view
|

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

George Triantafillou
Hi Ioi,

Looks good.

-George

On 11/28/2017 12:58 PM, Ioi Lam 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
>

Reply | Threaded
Open this post in threaded view
|

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

Jiangli Zhou
In reply to this post by Ioi Lam
Hi Ioi,

For the following check at line 72 in ProhibitedPackage.java, can you include more complete logging output "[info][class,load] java.lang.Prohibited”? So other output message for java.lang.Prohibited would not be mistakenly matched for this check. No new webrev needed for me with the shouldNotContain() content change.

.shouldNotContain("java.lang.Prohibited")
I noticed you didn't have the tests mentioned in the email. Could you please list the tests that you run?

Thanks,
Jiangli

> On Nov 28, 2017, at 9:58 AM, Ioi Lam <[hidden email]> 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
>

Reply | Threaded
Open this post in threaded view
|

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

Volker Simonis
In reply to this post by Ioi Lam
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?

Regards,
Volker


On Tue, Nov 28, 2017 at 6:58 PM, Ioi Lam <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

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

Ioi Lam
In reply to this post by Jiangli Zhou
Hi Jiangli,

Thanks for the review.

On 11/28/17 10:19 AM, Jiangli Zhou wrote:
> Hi Ioi,
>
> For the following check at line 72 in ProhibitedPackage.java, can you
> include more complete logging output "[info][class,load]
> java.lang.Prohibited”? So other output message for
> java.lang.Prohibited would not be mistakenly matched for this check.
> No new webrev needed for me with the shouldNotContain() content change.
>
> .shouldNotContain("java.lang.Prohibited")

Good idea! I changed it to

             .shouldNotContain("[info][class,load] java.lang.Prohibited
source: ")

so it won't be confused with other messages that could possibly have the
string "java.lang.Prohibited" in it.

> I noticed you didn't have the tests mentioned in the email. Could you
> please list the tests that you run?
>
I ran all the appcds tests on Linux/x64 in both product and debug
builds. The names of the two tests are mentioned in the subject of this
email :-)

Thanks
- Ioi

> Thanks,
> Jiangli
>
>> On Nov 28, 2017, at 9:58 AM, Ioi Lam <[hidden email]
>> <mailto:[hidden email]>> 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
>>
>

Reply | Threaded
Open this post in threaded view
|

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

Ioi Lam
In reply to this post by Volker Simonis


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 <[hidden email]> 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
>>

Reply | Threaded
Open this post in threaded view
|

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

Volker Simonis
On Tue, Nov 28, 2017 at 7:51 PM, Ioi Lam <[hidden email]> 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?

Regards,
Volker

> Thanks
> - Ioi
>
>
>> Regards,
>> Volker
>>
>>
>> On Tue, Nov 28, 2017 at 6:58 PM, Ioi Lam <[hidden email]> 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
>>>
>
Reply | Threaded
Open this post in threaded view
|

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

Ioi Lam


On 11/29/17 12:02 AM, Volker Simonis wrote:

> On Tue, Nov 28, 2017 at 7:51 PM, Ioi Lam <[hidden email]> 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 <[hidden email]> 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
>>>>