RFR: JDK-8208471: nsk/jdb/unwatch/unwatch002/unwatch002.java fails with "Prompt is not received during 300200 milliseconds"

Alex Menkov alexey.menkov at oracle.com
Fri Sep 21 21:56:01 UTC 2018


Thanks, Chris,

Looked at the issues and nsk jdb stuff again - may be you are right and 
fixing nsk jdb code we can get a bunch of new test issues.

So ok, lets make local fixes for the known issues for now.
LGTM.

--alex

On 09/21/2018 09:12, Chris Plummer wrote:
> I don't think Alex actually gave a thumbs up for this change yet. He 
> just offered a suggestion for an alternate way to fix.
> 
> Chris
> 
> On 9/21/18 5:18 AM, Gary Adams wrote:
>> Patch attached.
>>
>>
>> On 9/20/18, 8:17 PM, Chris Plummer wrote:
>>> Ok, so you're just suggesting that findPrompt() should require that 
>>> the prompt be at the end of the line. In fact probably on a line by 
>>> itself. Keep in mind that we also have issues with async printing 
>>> that tends to result in the prompt appearing in the middle of some 
>>> lines. We have most of these situations understood and under control 
>>> now, but I'm guessing they still turn up in some places, and would 
>>> cause findPrompt() to fail.
>>>
>>> Chris
>>>
>>> On 9/20/18 4:06 PM, Alex Menkov wrote:
>>>> To be detected the output line should ends with "Boolean[1] "
>>>>
>>>> So "Field (nsk.jdb.unwatch.unwatch002.unwatch002a.FS1) is null, will 
>>>> be instance of java.lang.Boolean[1] (id=706):" does not match.
>>>> It seems to me that other bugs Gary is working have similar cases.
>>>>
>>>> --alex
>>>>
>>>> On 09/20/2018 15:27, Chris Plummer wrote:
>>>>> The regex you give would still detect Boolean[1] as a prompt, which 
>>>>> we don't want.
>>>>>
>>>>> Chris
>>>>>
>>>>> On 9/20/18 3:22 PM, Alex Menkov wrote:
>>>>>> May be it would be better to fix Jdb.receiveReplyFor to properly 
>>>>>> handle all replies like
>>>>>> Field (nsk.jdb.unwatch.unwatch002.unwatch002a.FS1) is null, will 
>>>>>> be instance of java.lang.Boolean[1] (id=706):
>>>>>>
>>>>>> jdk/com/sun/jdi tests use the following regexp to detect jdb prompt:
>>>>>> "[a-zA-Z0-9_-][a-zA-Z0-9_-]*\[[1-9][0-9]*\] [ >]*$"
>>>>>> (see test/jdk/com/sun/jdi/lib/jdb/Jdb.java or
>>>>>> test/jdk/com/sun/jdi/ShellScaffold.sh)
>>>>>> AFAIR nsk/../Jdb does not use regexp, but I believe it can be 
>>>>>> updated to work the same way.
>>>>>>
>>>>>> --alex
>>>>>>
>>>>>>
>>>>>> On 09/20/2018 14:50, Chris Plummer wrote:
>>>>>>> This one is a little different than exclude001 in that we don't 
>>>>>>> control the name of the thread. We know (at least at the moment) 
>>>>>>> that it is called "main", but that could always change. In 
>>>>>>> general I'm fine with this fix, but if you have others like it, 
>>>>>>> I'd suggest putting the "main" thread name in single place, not 
>>>>>>> in each test that cares about it.
>>>>>>>
>>>>>>> Chris
>>>>>>>
>>>>>>> On 9/20/18 10:54 AM, Gary Adams wrote:
>>>>>>>> The corrupted output has been identified due to the "Boolean[1]"
>>>>>>>> being misrecognized as a compound prompt.
>>>>>>>>
>>>>>>>> The proposed fix waits for the correct prompt before
>>>>>>>> advancing to the next command.
>>>>>>>>
>>>>>>>>   Webrev: http://cr.openjdk.java.net/~gadams/8208471/webrev/
>>>>>>>>   Issue: https://bugs.openjdk.java.net/browse/JDK-8208471
>>>>>>>>
>>>>>>>> Testing is in progress.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>>
> 
> 


More information about the serviceability-dev mailing list