RFR (S) 8007142: Add utility classes for writing better multiprocess tests in jtreg

Yekaterina Kantserova yekaterina.kantserova at oracle.com
Fri Feb 1 12:12:28 UTC 2013

Hi everyone,

Here comes a http://cr.openjdk.java.net/~ykantser/8007142/webrev.01/ 
with following fixes compared to .00:

* new line is added at the end of** the StreamPumper.java
* <code> is changed to {@code in the StreamPumper.java
* JDKToolFinder.java will use the system property "java.home" instead of 
"test.jdk" (thus -compilejdk problem is solved)


Yes, the library can launch a Java process, wait for it to finish, and 
collect all the output (stdout and stderr). There is no client/server 
solution yet, but as soon as we have testlibrary a lot of good utility 
classes can be put there.

This solution's use case is writing simple tests in jtreg without using 
shell scripts.

JcmdBase.java is an example of how it works.

class MyTest extends JcmdBase {


public void verify() {
         OutputAnalyzer output = jcmd("VM.version");
         output.shouldContain("Java HotSpot");



As I've mentioned before it's almost a copy of 
http://cr.openjdk.java.net/~ctornqvi/webrev/8006413/webrev.03/ which has 
been reviewed and approved and on the way in into hotspot/test.


More information about the core-libs-dev mailing list