[TESTBUG]: Syntax error in test description of jdk8u-dev/.../JcmdWithNMTDisabled.java ?

Volker Simonis volker.simonis at gmail.com
Fri Jun 26 12:33:17 UTC 2015


Thanks David,

It's also amazing that this actually did run with older versions of
jtreg without producing an error (altough it produced a lot of
useless, empty directories  - on for each word in the 'comment' lines
:)

So I assume somebody is taking care of this issue.

Regards,
Volker


On Fri, Jun 26, 2015 at 1:53 PM, David Holmes <david.holmes at oracle.com> wrote:
> Hi Volker,
>
> Known issue:
>
> https://bugs.openjdk.java.net/browse/JDK-8098541 (not public sorry)
>
> but mis-processed in my opinion so I'm trying to get it re-addressed.
>
> It's amazing how many people had no idea that tags spanned multiple lines,
> and that there was no commenting mechanism. :(
>
> David
>
>
> On 26/06/2015 7:09 PM, Volker Simonis wrote:
>>
>> Hi,
>>
>> after I've upgraded to the latest and greatest version of JTreg
>> (168:055251d38f29 "minor naming cleanup in Agent") I get an error when
>> executing the hotspot test:
>>
>> runtime/NMT/JcmdWithNMTDisabled.java
>>
>> from the jdk8u-dev (notice that the same test from the jdk9 forest
>> runs just fine because it was already refactored).
>>
>> I think this is because of the strange tag syntax the test uses:
>>
>> /*
>>   * @test
>>   * @key nmt jcmd
>>   * @summary Verify that jcmd correctly reports that NMT is not enabled
>>   * @library /testlibrary
>>   * First run without enabling NMT
>>   * @run main/othervm JcmdWithNMTDisabled
>>   * Then run with explicitly disabling NMT, should not be any difference
>>   * @run main/othervm -XX:NativeMemoryTracking=off JcmdWithNMTDisabled
>>   */
>>
>> The problem is that the comment line "First run without enabling NMT"
>> will be appended to the "@library" tag like this:
>>
>> @library /testlibrary First run without enabling NMT
>>
>> yielding in strange class paths during execution which contain
>> "<path>/First:<path>/run:<path>/without:...". But apparently this
>> doesn't confuse older version of JTreg too much because the test
>> succeeded nevertheless.
>>
>> However with the newest JTreg version the test badly fails with the error:
>>
>> test result: Error. Test Class Exception: Can't find library: First
>>
>> Notice that "First" is the first word of the comment line "First run
>> without enabling NMT" in the tag description.
>>
>> So is this indeed an error in the test description of
>> JcmdWithNMTDisabled.java and should it be fixed by removing the two
>> lines:
>>
>>    * @library /testlibrary
>> - * First run without enabling NMT
>>    * @run main/othervm JcmdWithNMTDisabled
>> - * Then run with explicitly disabling NMT, should not be any difference
>>    * @run main/othervm -XX:NativeMemoryTracking=off JcmdWithNMTDisabled
>>
>> from the test description to make it runnable with newer JTreg versions as
>> well?
>>
>> Regards,
>> Volker
>>
>


More information about the code-tools-dev mailing list