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

Jiri Vanek jvanek at redhat.com
Thu Mar 26 07:46:34 UTC 2015


Hello!

I'm maintaining few thousand tests for various jdks (generally jdk 1.5-jdk 9) . However, current 
workarounds about  which test is valid for which jdk are insufficient.

I came to conclusion, that some kind of @validfor-jdk-version or @validfor or @ignoredfor or 
enhancing of @ignore would solve my issues.

Currentl I'm inklining to @validfor  or @validfor-version as (currently (with this 7years history)) 
it is not necessary to distinguish anything else then java.version. My suggested format will be 
white-chars separated list of conditions with control words of = < > <= >= followed  by version 
string and with evaluation based on version sort and on or between predicates

So eg:
@validfor  <=1.6 >1.7 =1.4.2

If java.version  will not be  valid for any of predicate then the test will be handled in same way 
as if @ignore is  specified. If it is valid, or annotation missing at all, test will be normally 
proceed.

Do you think enhancement like this is acceptable?

If so ,I will prepare webrew soon, and will post it for review.

Thank you!

  J.


More information about the jtreg-dev mailing list