RFR(L/M) : 8210112 : remove jdk.testlibrary.ProcessTools
igor.ignatyev at oracle.com
Wed Sep 5 01:33:07 UTC 2018
> 2375 lines changed: 322 ins; 1662 del; 391 mod
could you please review the patch which removes jdk.testlibrary.ProcessTools and its friends and replaces all theirs usages w/ corresponding classes from jdk.test.lib.process?
there were a few differences b/w implementations which are addressed by the patch:
- j.t.l.p.ProcessTools missed executeProcess(ProcessBuilder, String) method
- j.t.l.p.OutputAnalyzer didn't have shouldMatchByLine methods family
- j.t.l.p.OutputBuffer was a very rudimentary and didn't serve any purposes, while j.t.OutputBuffer provided lazy access to a process's cout, cerr and exitcode. I have changed j.t.l.p.OutputBuffer to be an interface w/ two implementations LazyOutputBuffer and EagerOutputBuffer, and updated j.t.l.p.OutputAnalyzer to get values from an OutputBuffer instead of storing them.
- j.t.l.p.ProcessTools::createJavaProcessBuilder always adds '-cp', but j.t.ProcessTools::createJavaProcessBuilder did not. I have identified tests which really depend on absence of '-cp' and updated them to create ProcessBuilder directly, namely JavaClassPathTest and AppendToClassPathModuleTest.
the rest of the patch is straightforward change of used classes w/ adding @library /test/lib if necessary and removing @library /lib/testlibrary if possible.
testing: tier1-tier3 + :jdk_svc
More information about the hotspot-runtime-dev