RFR(S): 8164944: Refactor ProcessTools to get rid of dependency on java.management

Igor Ignatyev igor.ignatyev at oracle.com
Wed Apr 12 19:14:20 UTC 2017

forgot to update copyrights, http://cr.openjdk.java.net/~iignatyev//8164944/webrev.01/index.html <http://cr.openjdk.java.net/~iignatyev//8164944/webrev.01/index.html>

> On Apr 12, 2017, at 12:03 PM, Igor Ignatyev <igor.ignatyev at oracle.com> wrote:
> http://cr.openjdk.java.net/~iignatyev//8164944/webrev.00/index.html
>> 92 lines changed: 36 ins; 36 del; 20 mod; 
> Hi all,
> could you please review this small fix which removes dependency on java.management module from the testlibrary?
> jdk.test.lib.process.ProcessTools class has getVmInputArgs method which depend on java.management, this method is used only by j.d.t.process.ProcessTools::executeTestJvmAll and j.t.l.cli.CommandLineOptionTest class.
> - ProcessTools::executeTestJvmAll is a variation of executeTestJvm which prepends vm flags from jtreg @run.
> - CommandLineOptionTest is a library class for cli testing, it uses flags from ProcessTools::getVmInputArgs to create a new jvm with all flags
> the fix removes ProcessTools::executeTestJvmAll method, moves getVmInputArgs to a separate class jdk.test.lib.management.InputArguments. c.c.s.scenario.Executor and j.t.l.cli.CommandLineOptionTest are updated to use getVmInputArgs from that class. c.j.compilerToVM.DebugOutputTest is refactored to pass add-exports and patch module directly. all the affected classes and obviously updated to use executeTestJvm instead of executeTestJvmAll.
> after this fix many hotspot tests won't depend on java.management, hence that module might be removed from their @modules, this will be done separately by 8178416.
> jbs: https://bugs.openjdk.java.net/browse/JDK-8164944
> webrev: http://cr.openjdk.java.net/~iignatyev//8164944/webrev.00/index.html
> testing: :hotspot_all
> 8178416: https://bugs.openjdk.java.net/browse/JDK-8178416
> Thanks,
> -- Igor

More information about the hotspot-dev mailing list