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


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.


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

    * @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)

- Ioi

More information about the hotspot-runtime-dev mailing list