[rfc] make test ignored or valid only for specific JDK

Jiri Vanek jvanek at redhat.com
Wed Apr 1 17:34:50 UTC 2015


On 03/30/2015 03:51 PM, Jiri Vanek wrote:
> On 03/30/2015 01:25 PM, Jiri Vanek wrote:
>> On 03/26/2015 07:18 PM, Jonathan Gibbons wrote:
>>> Jiri,
>>>
>>> I presume you are talking about a set of tests that is distinct from any of the jtreg test suites in
>>
>> Sure :)
>>
>>> an OpenJDK forest, such as langtools/test, jdk/test, etc.   Those test suites are tied to the code
>>> in the overall forest, and so are inherently versioned without any additional notation.
>>>
>>> There are a variety of existing mechanisms you could use to address this problem, without adding any
>>> new features.
>>>
>>> 1. Use test lists.   You can keep lists identifying which tests are valid in each version, and then
>>> specify files containing those lists on the command line with the "@file" mechanism
>>>
>>> 2. Use exclude lists.  You can keep lists identifying which tests are /not/ valid in each version,
>>> and then specify files containing those lists on the command line with the "-exclude file" mechanism
>>>
>>
>> Both above have the same maintenance burden as various copies.
>>
>>> 3. Keywords. You can tag individual tests with any keywords you choose to use, as long as you also
>>> declare the overall set of valid keywords in the TEST.ROOT file.   You can filter the set of tests
>>> to be executed with the "-k expr" command line option.
>>
>> Yes keywords are pretty close, and were elaborated. However.. needs some settings on launcher side,
>> and so didn't fit.
>>
>>>
>>> 4. @requires. This is a relatively new feature. You can put a declarative tag in a test description
>>
>> Ok I did not know this one.
>>> of the form "@requires expr" where there is a variety of terminals, of which jdk.version is but
>>> one.   So you could add a line like
>>>      @requires  jdk.version <=1.6 || jdk.version >1.7 || jdk.version = "1.4.2"
>>> Not as compact as your proposal, but it exists today.
>
>
> hmhm. It does not seem to be working as "advertised":
>
>   * @requires jdk.version <= 1.7
>
> leads to :
> test result: Error. Parse Exception: Syntax error in @requires expression: unrecognized character: `.'
>
>   * @requires jdk.version <= 7
> leads to
> test result: Error. Error evaluating expression: invalid numeric value: 1.8
>
> Is it expected bahviour? I tried also with various spaces/nospace....
>
>
ping? Is it expected? If not, I will provide you a fix.

J.



More information about the jtreg-dev mailing list