RFR(tedius) 8229267 [TESTBUG] Remove unnecessary @module dependencies in CDS tests

Ioi Lam ioi.lam at oracle.com
Fri Aug 9 01:31:02 UTC 2019


https://bugs.openjdk.java.net/browse/JDK-8229267
http://cr.openjdk.java.net/~iklam/jdk14/8229267-remove-unncessary-at-modules-from-cds-tests.v01/

We have lots of unnecessary @modules tags in the hotspot test cases. I 
wrote a script that
attempts to remove each specified module. If the test can still be 
executed successfully, it
means the specified module is not needed.

To limit the scope of changes, I am doing it on only the cds tests in 
this changeset.

Examples:

test/hotspot/jtreg/runtime/cds/ArchiveDoesNotExist.java
    * @requires vm.cds
    * @library /test/lib
-  * @modules java.base/jdk.internal.misc
-  *          java.management
    * @run driver ArchiveDoesNotExist
    */

test/hotspot/jtreg/runtime/cds/appcds/ClassLoaderTest.java
    * @library /test/lib
!  * @modules java.base/jdk.internal.misc
!  *          java.management
!  *          jdk.jartool/sun.tools.jar
    * @compile test-classes/Hello.java
------
    * @library /test/lib
!  * @modules jdk.jartool/sun.tools.jar
    * @compile test-classes/Hello.java


Lots of files are changed, but the changes are pretty uniform. I 
verified by:

+ mach5: run all tests under test/hotspot/jtreg/runtime/cds
+ mach5: run hs-tier{1,2,3}
+ visually look at the changes in each file in graphical diff tool

My script can be found under the attachment of the bug page (clean_dep.tcl)

Thanks
- Ioi



More information about the hotspot-runtime-dev mailing list