RFR: JDK-8209604: [TEST] rewrite com/sun/jdi shell tests to java version - step2
Alex Menkov
alexey.menkov at oracle.com
Mon Aug 27 23:39:12 UTC 2018
yes, I understand.
To verify the output I added throw at the end of the test :)
--alex
On 08/27/2018 16:36, Chris Plummer wrote:
> Yeah, I think the issue I had with extra newlines was with nsk tests.
> But it was something you only saw if the test failed, forcing the log to
> include all the output.
>
> thanks,
>
> Chris
>
> On 8/27/18 4:14 PM, Alex Menkov wrote:
>> Hi Chris,
>>
>> This "newline stripping" logic was copied from nsk classes, where jdb
>> commands are represented as string constants and some of the constants
>> have newline at the end (for the commands which do not have
>> arguments), and others don't have.
>> JdbCommand class in com/sun/jdi/lib/jdb/ has static factory methods to
>> create commands and it does not expect any new lines in the commands,
>> so this stripping logic is not required.
>>
>> I rechecked - jdb output looks good (no extra newlines).
>> Maybe you mean some issues with nsk classes?
>>
>> --alex
>>
>> On 08/27/2018 14:55, Chris Plummer wrote:
>>> Hi Alex,
>>>
>>> I noticed you no longer strip the trailing newline from JdbCommand.
>>> Are you sure when we print the command we are seeing the proper
>>> output of newlines (no extra ones). For example, we have the
>>> following in Jdb.java:
>>>
>>> System.out.println("> " + cmd.cmd);
>>>
>>> inputWriter.println(cmd.cmd);
>>>
>>> This looks like it will print an extra newline in cases where it was
>>> not stirpped. And I should point out that on windows we see a lot of
>>> extra newlines in the jdb output. I thought I had tracked this down
>>> once, but can't find the email were I explained the cause. But your
>>> change leads me to think it might have been faulty stripping of the
>>> newline in JdbCommand, and now you are making it so it never strips.
>>>
>>> thanks,
>>>
>>> Chris
>>>
>>> On 8/16/18 2:13 PM, Alex Menkov wrote:
>>>> Hi all,
>>>>
>>>> Please review next chunk of shell->java test conversion.
>>>> jira: https://bugs.openjdk.java.net/browse/JDK-8209604
>>>> webrev: http://cr.openjdk.java.net/~amenkov/sh2java/step2/webrev/
>>>>
>>>> The fix contains some changes in library classes:
>>>> Jdb.java - timeouts are updated (as per Dan note in one of previous
>>>> review, timeouts should respect timeout factor, Utils.adjustTimeout
>>>> implements the functionality);
>>>> JdbCommand.java - new jdb commands (required by tests) are added.
>>>>
>>>> --alex
>>>
>>>
>>>
>
>
More information about the serviceability-dev
mailing list