RFR(XS) 8220030: JdbStopThreadidTest.java failed due to "Unexpected IO error while writing command 'quit' to jdb stdin stream"

Alex Menkov alexey.menkov at oracle.com
Tue Mar 5 17:48:36 UTC 2019


LGTM too.

--alex

On 03/05/2019 04:47, Gary Adams wrote:
> This looks OK to me.
> 
> If a specific return code is expected,
> then the test should wait until it gets the response it needs.
> 
> If a specific return is not required, the test should be lenient
> about what information is required for the test to complete.
> 
> On 3/4/19, 10:41 PM, Chris Plummer wrote:
>> Hello,
>>
>> Please review the following. Details are in the bug. In short, the way 
>> I was checking for the application exit was a bit non-standard and 
>> exposed what is probably a bug in the JdbTest shutdown code. I changed 
>> the test to conform to the way other test run to exit:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8220030
>>
>> diff --git a/test/jdk/com/sun/jdi/JdbStopThreadidTest.java 
>> b/test/jdk/com/sun/jdi/JdbStopThreadidTest.java
>> --- a/test/jdk/com/sun/jdi/JdbStopThreadidTest.java
>> +++ b/test/jdk/com/sun/jdi/JdbStopThreadidTest.java
>> @@ -32,6 +32,7 @@
>>   * @run main/othervm JdbStopThreadidTest
>>   */
>>
>> +import jdk.test.lib.process.OutputAnalyzer;
>>  import lib.jdb.Jdb;
>>  import lib.jdb.JdbCommand;
>>  import lib.jdb.JdbTest;
>> @@ -138,6 +139,7 @@
>>          jdb.command(JdbCommand.cont().waitForPrompt("Breakpoint hit: 
>> \"thread=MYTHREAD-2\", \\S+MyThread.brkMethod", true));
>>          // Continue until the application exits. Once again, hitting 
>> a breakpoint will cause
>>          // a failure because we are not suppose to hit one.
>> - jdb.command(JdbCommand.cont().waitForPrompt(Jdb.APPLICATION_EXIT, 
>> true));
>> +        jdb.contToExit(1);
>> +        new 
>> OutputAnalyzer(getJdbOutput()).shouldContain(Jdb.APPLICATION_EXIT);
>>
>> thanks,
>>
>> Chris
>>
>>
> 


More information about the serviceability-dev mailing list