RFR(S): 8164944: Refactor ProcessTools to get rid of dependency on java.management
David Holmes
david.holmes at oracle.com
Thu Apr 13 01:47:11 UTC 2017
Hi Igor,
Overall this looks good.
To be clear the old executeTestJvmAllArgs() presumably provides the VM
options from @run _and_ @module - right? So if they don't exist in a
test we can simply replace the usage of executeTestJvmAllArgs with
executeTestJvm - as done in:
test/compiler/c2/cr7200264/TestDriver.java
And for other tests we either grab the VM input arguments as a separate
step, or else reconstruct them as needed (eg for the module flags in
DebugOutputTest).
Thanks,
David
On 13/04/2017 5:03 AM, Igor Ignatyev 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-compiler-dev
mailing list