RFR (S): 8145445: [TESTBUG] runtime/logging tests need to properly build and import libraries

Rachel Protacio rachel.protacio at oracle.com
Fri Dec 18 16:39:02 UTC 2015


Ok, so do I have the all clear to check this in? Stas? Currently only 
reviewed by Ioi.

Thank you,
Rachel

On 12/17/2015 7:45 PM, David Holmes wrote:
> Hi Stas,
>
> Please takes this up with Jon and the code-tools project. As it stands 
> the tests that don't build the testlibrary are not adhering to the 
> jtreg spec requirements and can fail under some circumstances - which 
> we keep encountering. This is arguably a limitation in jtreg but it is 
> what it is - see also:
>
> https://bugs.openjdk.java.net/browse/CODETOOLS-7901569
>
> and bugs linked there-from.
>
> Cheers,
> David
>
>
> On 17/12/2015 9:48 PM, Stas Smirnov wrote:
>> Hi,
>>
>> lets take a look on the spec and how it works,
>>
>> when you specify @run ... what actually happens is @build with your main
>> class is invoked and in result 'javac -sourcepath <paths from @library>
>> yourMainClass' is being executed.
>> When javac finds some external dependency it first searches in the
>> -sourcepath and if it finds it, compiles it.
>> It is a default execution logic.
>>
>> If you i.e. use some other class in you sources you can just add the
>> root '/' path to the @library and that's it.
>> The vast majority, I will assume almost all of the tests, does not
>> specify all the dependencies in the @build, so I assume here, with your
>> tests, we are facing some specific situation that needs to be evaluated
>> to find the root cause.
>> Otherwise it seems to be a some kind of a workaround and all the other
>> tests need to be updated as well.
>>
>> Let's take a look on the issues your are facing and try to find the root
>> cause, may be not in this thread.
>>
>> On 16/12/15 22:14, Ioi Lam wrote:
>>> Hi Rachel,
>>>
>>> The changes look good.
>>>
>>> Stas, I can testify that what David said is true. We have seen
>>> mysterious nightly test failures because of the missing @build.
>>>
>>> Also see http://openjdk.java.net/jtreg/tag-spec.html
>>>
>>> "@library <path|jar>+
>>>
>>> Classes in library directories are not automatically compiled. A test
>>> that relies upon library classes should contain appropriate @build
>>> directives to ensure that the classes will be compiled."
>>>
>>> - Ioi
>>>
>>> On 12/16/15 10:57 AM, Rachel Protacio wrote:
>>>> Hi, Stas,
>>>>
>>>> On 12/16/2015 1:03 PM, Stas Smirnov wrote:
>>>>> Hi Rachel,
>>>>>
>>>>> since you are using library classes i.e. OutputAnalyzer in the
>>>>> source code, jtreg will automatically build it, there is no need to
>>>>> explicitly define it in the test annotations
>>>> Well, according to David Holmes (on an earlier email that prompted
>>>> this changeset), "Simply using a library doesn't force it to be
>>>> built. It may be built due to implicit compiler dependencies or it
>>>> may not. We have had numerous test bugs where tests couldn't find the
>>>> library when run in certain ways/configurations because the test
>>>> itself was not forcing it to be built. The potential problem has been
>>>> flagged many times." What do you think? It seems to me like it can't
>>>> hurt to include the lines anyway, and that we need to if what David
>>>> says is true.
>>>>
>>>> R
>>>>>
>>>>> On 16/12/15 20:56, Rachel Protacio wrote:
>>>>>> Hi!
>>>>>>
>>>>>> Please review my small change adding the proper @build and import
>>>>>> lines to the jtreg tests in the runtime/logging directory. A
>>>>>> safeguard against potential occasional bugs in running the tests.
>>>>>>
>>>>>> Open webrev: http://cr.openjdk.java.net/~rprotacio/8145445/
>>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8145445
>>>>>>
>>>>>> Thanks!
>>>>>> Rachel
>>>>>
>>>>
>>>
>>



More information about the hotspot-runtime-dev mailing list