hg: jdk8/tl/jdk: 8007142: Add utility classes for writing better multiprocess tests in jtreg

2013-02-07 Thread staffan . larsen
Changeset: 2de8c6c2d652 Author:ykantser Date: 2013-02-07 11:22 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/2de8c6c2d652 8007142: Add utility classes for writing better multiprocess tests in jtreg Reviewed-by: alanb, rbackman + test/lib/testlibrary/OutputAnalyzerTest.java

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

2013-02-05 Thread Yekaterina Kantserova
On 02/04/2013 02:18 PM, Alan Bateman wrote: On 04/02/2013 11:03, Yekaterina Kantserova wrote: But JDKToolFinder.getJDKTool is used even for finding java, e.g. I need to fork a java process - JDKToolFinder.getJDKTool(java) for some JRE tests? It might be better to rename JDKToolFinder to

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

2013-02-05 Thread Alan Bateman
On 05/02/2013 10:51, Yekaterina Kantserova wrote: On 02/04/2013 02:18 PM, Alan Bateman wrote: On 04/02/2013 11:03, Yekaterina Kantserova wrote: But JDKToolFinder.getJDKTool is used even for finding java, e.g. I need to fork a java process - JDKToolFinder.getJDKTool(java) for some JRE tests?

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

2013-02-04 Thread Yekaterina Kantserova
On 02/01/2013 04:18 PM, Alan Bateman wrote: On 01/02/2013 15:06, Yekaterina Kantserova wrote: Thanks for explanation! But I'm still confused. In my use case I need to test /_the tool_/ I'll find with JDKToolFinder. It will work if just -jdk will be specified. But if -compilejdk happens to

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

2013-02-04 Thread Alan Bateman
On 04/02/2013 10:33, Yekaterina Kantserova wrote: No, it was a bad example. Let's take another one: /java -jar jtreg.jar -jdk MONKEY -compilejdk LION test.java/ In this case JDKToolFinder.getJDKTool(jcmd) will return LION/bin/jcmd, but I need to test MONKEY/bin/jcmd. The -compilejdk option

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

2013-02-04 Thread Yekaterina Kantserova
On 02/04/2013 11:55 AM, Alan Bateman wrote: On 04/02/2013 10:33, Yekaterina Kantserova wrote: No, it was a bad example. Let's take another one: /java -jar jtreg.jar -jdk MONKEY -compilejdk LION test.java/ In this case JDKToolFinder.getJDKTool(jcmd) will return LION/bin/jcmd, but I need to

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

2013-02-04 Thread Alan Bateman
On 04/02/2013 11:03, Yekaterina Kantserova wrote: But JDKToolFinder.getJDKTool is used even for finding java, e.g. I need to fork a java process - JDKToolFinder.getJDKTool(java) for some JRE tests? It might be better to rename JDKToolFinder to something like JdkFinder and have it define

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

2013-02-01 Thread Alan Bateman
On 01/02/2013 12:12, Yekaterina Kantserova wrote: 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 *

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

2013-02-01 Thread Yekaterina Kantserova
On 02/01/2013 01:32 PM, Alan Bateman wrote: On 01/02/2013 12:12, Yekaterina Kantserova wrote: 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

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

2013-02-01 Thread Alan Bateman
On 01/02/2013 13:32, Yekaterina Kantserova wrote: I've done some testing before I've changed JDKToolFinder. Bellow are 2 cases: 1) *compile.jdk != test.jdk* ./build/linux-amd64/j2sdk-image/bin/java -jar jtreg.jar -compilejdk /localhome/java/jdk1.7.0_09 test.java

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

2013-02-01 Thread Yekaterina Kantserova
On 02/01/2013 03:20 PM, Alan Bateman wrote: On 01/02/2013 13:32, Yekaterina Kantserova wrote: I've done some testing before I've changed JDKToolFinder. Bellow are 2 cases: 1) *compile.jdk != test.jdk* ./build/linux-amd64/j2sdk-image/bin/java -jar jtreg.jar -compilejdk

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

2013-02-01 Thread Alan Bateman
On 01/02/2013 15:06, Yekaterina Kantserova wrote: Thanks for explanation! But I'm still confused. In my use case I need to test /_the tool_/ I'll find with JDKToolFinder. It will work if just -jdk will be specified. But if -compilejdk happens to be specified the results of my tests will be

Re: 8007142: Add utility classes for writing better multiprocess tests in jtreg

2013-01-30 Thread Rickard Bäckman
Katja, I think the change looks good. However we need to find an official reviewer before we can push this. Can we get an official reviewer to look on this change please? Thanks /R On Jan 30, 2013, at 3:11 PM, Yekaterina Kantserova wrote: Hi everyone, In the previous mail I've referred

Re: 8007142: Add utility classes for writing better multiprocess tests in jtreg

2013-01-30 Thread Martin Buchholz
I don't have time for a detailed review, but I have some high-level comments. A lot of this is good functionality that should be provided in the jdk proper, notably getting process ids and manipulating process output (a higher level interface to ProcessBuilder). See the test ProcessBuilder/Basic

Re: 8007142: Add utility classes for writing better multiprocess tests in jtreg

2013-01-30 Thread Martin Buchholz
[ email address fail: jdk-core-libs-dev_ww_...@oracle.com] On Wed, Jan 30, 2013 at 12:36 PM, Martin Buchholz marti...@google.comwrote: I don't have time for a detailed review, but I have some high-level comments. A lot of this is good functionality that should be provided in the jdk proper,

Re: 8007142: Add utility classes for writing better multiprocess tests in jtreg

2013-01-30 Thread Weijun Wang
Just take a brief look at the codes. It seems the library can launch a Java process, wait for it to finish, and collect all the output (stdout and stderr). Is that all? I would be glad if it supports manipulating the stdin, i.e. simulating input to a process. For example, I sometimes need to