8007142: Add utility classes for writing better multiprocess tests in jtreg
weijun.wang at oracle.com
Thu Jan 31 00:54:37 UTC 2013
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 start two
processes, one is a client, and one is a server, and they need to talk
to each other. I could create sockets inside but it will be much simpler
(and more stable) if they can just communicate through stdin/stdout.
This also means you cannot drain the stdout in a single method, but read
it after each input, you might need to prepare for blocking.
Also, It will be nice if there is an example on how to use it.
In fact, I'm working on something similar right now:
On 01/30/2013 10:40 PM, Rickard Bäckman wrote:
> 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?
> On Jan 30, 2013, at 3:11 PM, Yekaterina Kantserova wrote:
>> Hi everyone,
>> In the previous mail I've referred to already existing BUG number, which was wrong. Here comes the webrev referred to the new BUG
>> -------- Original Message --------
>> Subject: 8006413: Add utility classes for writing better multiprocess tests in jtreg
>> Date: Tue, 29 Jan 2013 15:13:11 +0100
>> From: Yekaterina Kantserova <yekaterina.kantserova at oracle.com>
>> To: core-libs-dev at openjdk.java.net
>> CC: jfr_dev_ww_grp <jfr_dev_ww_grp at oracle.com>
>> Hi everyone,
>> Christian Törnqvist has done a great job to make it easier to run
>> multi-process tests in jtreg. His webrev
>> ) is
>> already approved and on the way into the hotspot repo.
>> This webrev
>> for putting these utility classes into the jdk repo. I'm going to use
>> them for the JFR testing in the first hand.
>> The webrev is almost a copy of Christian's except JcmdBase.java, utility
>> class for starting jcmd, and some extra methods in OutputAnalyzer.java.
More information about the core-libs-dev