6989903: (process) test/java/lang/ProcessBuilder/Basic.java failing with "Bad file number" (sol)
Kelly O'Hair
kelly.ohair at oracle.com
Wed Oct 6 16:37:11 UTC 2010
Looks ok to me.
Maybe your comment should be added to the test? Might explain the code
better.
-kto
On Oct 6, 2010, at 9:18 AM, Alan Bateman wrote:
>
> The fix for 6981138 a few weeks ago added another test to test/java/
> lang/ProcessBuilder/Basic.java. That test is failing on Solaris
> because the asynchronous close of the stream connected to the
> child's stdout causes the reader thread to throw an IOException with
> an exception message that the test doesn't expect. In en.* locales,
> it assumes the exception message will be "Bad file descriptor" but
> it's actually "Bad file number" on Solaris. It's always fragile to
> have tests that look at the exception message and it is tempting to
> just remove these checks. However this test does go out of its way
> to catch any change in behavior so for now anyway, I just propose
> make it a bit less fussy.
>
> Thanks,
>
> -Alan.
>
>
> diff -r b468b20a98a8 test/java/lang/ProcessBuilder/Basic.java
> --- a/test/java/lang/ProcessBuilder/Basic.java Tue Oct 05 15:07:40
> 2010 +0100
> +++ b/test/java/lang/ProcessBuilder/Basic.java Wed Oct 06 12:25:25
> 2010 +0100
> @@ -1845,7 +1845,7 @@ public class Basic {
> catch (IOException e) {
> // e.printStackTrace();
> if (EnglishUnix.is() &&
> - ! (e.getMessage().matches(".*Bad
> file descriptor.*")))
> + ! (e.getMessage().matches(".*Bad
> file.*")))
> unexpected(e);
> }
> catch (Throwable t) { unexpected(t); }}};
More information about the core-libs-dev
mailing list