RFR: 8272600: (test) Use native "sleep" in Basic.java

Roger Riggs rriggs at openjdk.java.net
Tue Aug 24 19:10:29 UTC 2021


On Tue, 24 Aug 2021 16:14:16 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> The intermittent test in java/lang/ProcessBuilder/Basic.java has identified unexpected messages from a child Java VM
>> as the cause of the test failure.  Attempts to control the output of the child VM have failed, the VM is unrepentant .
>> 
>> There is no functionality in the child except to wait long enough for the test to finish and the child is destroyed.
>> The fix is to switch from using a Java child to using a native child; a new executable `sleepmillis`.
>
> test/jdk/java/lang/ProcessBuilder/Basic.java line 30:
> 
>> 28:  *      6464154 6523983 6206031 4960438 6631352 6631966 6850957 6850958
>> 29:  *      4947220 7018606 7034570 4244896 5049299 8003488 8054494 8058464
>> 30:  *      8067796 8224905 8263729 8265173 8272600 8231297
> 
> The test should also be modified to use `@run main/othervm/native/timeout=300` so that this test will be flagged by jtreg if `-nativepath:` is not specified.

It should be possible to run this test as a main, without the overhead of building the native image.
The use of a Java child greatly reduces the complexity of the test and improves its maintainability.
Requiring a native special built program raises the overhead considerably.
And all because the VM can't or won't allow its output to be managed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5239


More information about the core-libs-dev mailing list