RFR(S, TESTONLY): JDK-8148315 Create a basic reproducer for JDI issues

Dmitry Samersoff dmitry.samersoff at oracle.com
Wed Jan 27 15:10:16 UTC 2016


Staffan,

On 2016-01-27 17:09, Staffan Larsen wrote:
> Have you looked at the com/sun/jdi test framework? The java framework
> is quite good and stable. The shell script framework should be
> removed.

Are you speaking about TestScaffold? - Yes, I tried to adopt it first.

Despite the fact that TestScaffold do much better job on JDI side than
proposed code, it has couple of problems (below).

So I decided to start from very basic framework that might grow up to
full functional one.


TestScaffold:

1. It's hard to use this class outside of com.sun.jdi tests because many
things is hardcoded.

2. It's hard to modify it, because many old tests, including 46 shell
scripts depends to it.

3. It doesn't provide a way to launch and terminate child. So
com.sun.jdi test directory contains whole bunch of empty programs:
(Foo.java, Exit0.java, HelloWorld.java etc).

4. Many tests in com.sun.jdi directory doesn't use this framework and
re-implements basic things again.


-Dmitry



> 
> /Staffan
> 
>> On 27 jan. 2016, at 13:02, Dmitry Samersoff
>> <dmitry.samersoff at oracle.com> wrote:
>> 
>> Staffan,
>> 
>> 1. This is one more small step forward to remove wide variety of 
>> Exit0.java (and similar) programs from jdk tests.
>> 
>> I will not happen today, but I hope, sometimes in a future, all
>> tests that launch a child process will do it the same way.
>> 
>> 2. We have couple of old SA-JDI tests in jdk.hotspot.agent/test
>> these tests have to be cleaned up and ported to JTREG, we need a
>> framework to do it.
>> 
>> 3. It's hard to debug JDI failures that comes from nightly without
>> small standalone reproducer. Especially if emulator or slow
>> hardware is involved.
>> 
>> I use this class as a base for such reproducer, find it helpful,
>> and would like to have it in the test library.
>> 
>> -Dmitry
>> 
>> 
>> On 2016-01-27 10:23, Staffan Larsen wrote:
>>> Can you explain more? There is very little information here or in
>>> the bug about what problem you are trying to solve. Why aren’t
>>> the current JDI tests (jdk/test/com/sun/jdi) sufficient? I have
>>> not read your code, and I would like more background before I do
>>> so.
>>> 
>>>> On 26 jan. 2016, at 22:53, Dmitry Samersoff 
>>>> <dmitry.samersoff at oracle.com> wrote:
>>>> 
>>>> Everybody,
>>>> 
>>>> Please review an RFE
>>>> 
>>>> http://cr.openjdk.java.net/~dsamersoff/JDK-8148315/webrev.01/
>>>> 
>>>> This fix adds basic LingeredApp based reproducer (and template
>>>> for more sophisticated reproducers) to debug JDI and underlying
>>>> JVMTI issues.
>>>> 
>>>> -Dmitry
>>>> 
>>>> -- Dmitry Samersoff Oracle Java development team, Saint
>>>> Petersburg, Russia * I would love to change the world, but they
>>>> won't give me the sources.
>>> 
>> 
>> 
>> -- Dmitry Samersoff Oracle Java development team, Saint Petersburg,
>> Russia * I would love to change the world, but they won't give me
>> the sources.
> 


-- 
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.


More information about the serviceability-dev mailing list