RFR: 7152183: TEST_BUG: java/lang/ProcessBuilder/Basic.java failing intermittently [sol]

Rob McKenna rob.mckenna at oracle.com
Wed Oct 3 21:44:35 UTC 2012


Hi folks,

The only way I can see this test failing in this manner[*] is if we 
destroy the process before we begin the read. That being the case I've 
jacked up the sleep (giving the reader thread a little more time to get 
cracking) and added a check to see if the threads stack has entered a 
read call.

http://cr.openjdk.java.net/~robm/7152183/webrev.01/ 
<http://cr.openjdk.java.net/%7Erobm/7152183/webrev.01/>

Feedback greatly appreciated.

     -Rob


[*] le trace:

java.io.IOException: Stream Closed
at java.io.FileInputStream.read(Native Method)
at java.lang.UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:253)
at Basic$64.run(Basic.java:1908)
java.lang.AssertionError: Some tests failed
at Basic.main(Basic.java:2248)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:474)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:722)

for 
http://hg.openjdk.java.net/jdk8/tl/jdk/file/d45bc4307996/test/java/lang/ProcessBuilder/Basic.java

(current version differs in line number)



More information about the core-libs-dev mailing list