RFR [6943190] TEST_BUG: java/lang/Runtime/exec/ExecWithInput.java hardcodes path to cat

Alan Bateman Alan.Bateman at oracle.com
Mon Mar 17 20:45:52 UTC 2014


On 17/03/2014 09:06, Ivan Gerasimov wrote:
> Thank you Alan!
>
> These two tests used the commands run from non very common location 
> (/usr/bin/ instead of /bin/), so I suspect they have been rarely run.
> As it follows from the summaries, one of them ensures the VM doesn't 
> crash; the other checks, whether the input/output streams are left open.
> Both tests in the case of a failure could interfere with other tests 
> unless they run in the othervm mode.
> That's why I thought it's better to add the flag.
If a test is badly behaved and is leaving streams open then I would 
agree with othervm. However these are old issues (right?) and should not 
be happening now. Also if a test tickles a bug that causes the VM to 
crash then jtreg will spin up a new VM for the next test. So if it's 
possible to avoid othervm then we should (and from what I can tell then 
these tests have been well behaved when running without othervm before).


> :
>
> For example, in test/java/lang/Runtime/exec/ConcurrentRead.java, if 
> 'tee' hadn't been found, the test just silently exited.
Okay, it's not a big deal as it shouldn't happen but still worth 
considering as it would be a lot better (in my view) to not hide an 
issue that prevents the test from running.

> :
>
> IMO ideally, there should be a configurable part of the harness, where 
> all the shell commands are set up.
> So that they could be accessed by both Java and shell-based regtests.
test/lib/testlibrary is the place for test-suite wide infrastructure. I 
don't know if there are tests beyond the Process area that needs to do 
the same kind of thing.

>
>> For the Linux or Solaris-only tests then the tests now output an 
>> information message via System.err, I assume this should be 
>> System.out as it's not really an error or usage message.
>>
> Fixed it.
Thanks.

-Alan.



More information about the core-libs-dev mailing list