RFR(XXS) [TESTBUG] TestOptionsWithRanges_generate.sh should be excluded from testing

Igor Ignatyev igor.ignatyev at oracle.com
Wed Jan 29 21:21:08 UTC 2020


> Now I understand why jtreg treats this script as a test, because I have this:
does it mean that your patch also didn't help? as I believe jtreg should see /* ... @test ...*/ separately from '#' comment block w/ @ignore and hence @ignore won't have any affect.
actually, I believe it's a bug in jtreg, borne shell doesn't have a block comment, and /* shouldn't be treated as possible start of a test description. 

-- Igor

> On Jan 29, 2020, at 1:00 PM, Ioi Lam <ioi.lam at oracle.com> wrote:
> 
> Hi Igor,
> 
> Sorry I already pushed the change.
> 
> Now I understand why jtreg treats this script as a test, because I have this:
> 
>     for i in {1..10}; do
>         cat <<EOF
>     /*
>      * @test
> 
> I will file a new bug to fix it properly, as you suggested. Something like
> 
>     at="@"
>     for i in {1..10}; do
>         cat <<EOF
>     /*
>      * ${at}test
> 
> Thanks
> - Ioi
> 
> On 1/29/2020 10:36 AM, Igor Ignatev wrote:
>> Hi Ioi,
>> 
>> The usual semantic of @ignore is “this *test* should not be run” , so using it here might be confusing. In other words, your patch won’t exclude this file from being counted as a test, and will just mark it as “broken”, and there is existing tooling which tracks such tests. The cleaner way would be to replace @ character with ‘at’ so jtreg won’t see this shell file as a test (even remove @).
>> 
>> Thanks,
>> — Igor
>> 
>>> On Jan 29, 2020, at 9:32 AM, Ioi Lam <IOI.LAM at oracle.com> wrote:
>>> 
>>> Hi, please review this very small change:
>>> 
>>> https://bugs.openjdk.java.net/browse/JDK-8237046
>>> 
>>> --- a/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges_generate.sh
>>> +++ b/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges_generate.sh
>>> @@ -20,6 +20,8 @@
>>>  # questions.
>>> 
>>>  # Generate the @test tags inside TestOptionsWithRanges.java
>>> +# @ignore
>>> +# This is not a test, but rather a script that generates actual tests.
>>> 
>>>  echo "// --- start auto-generated"
>>>  echo "// the following portion is auto-generated by $0. Do not edit manually."
>>> 
>>> 
>>> Thanks
>>> - Ioi
> 



More information about the hotspot-runtime-dev mailing list