RFR: 7904133: jtreg doesn't generate an error when @key tag is used more than once in a test definition

Christian Stein cstein at openjdk.org
Fri Jan 16 12:02:19 UTC 2026


On Fri, 16 Jan 2026 11:30:02 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this change which proposes to enforce the rule that `@key` in a test definition is expected to be used only once, as noted in the tag spec here https://openjdk.org/jtreg/tag-spec.html:
> 
>> The @key tag may be used at most once in a given test.
> 
> I decided to make it an error because the tag spec already notes that this isn't expected to be used more than once. So this should fail a test and generate attention instead of its current behaviour of silently using the second `@key`. Generating a warning, I think, doesn't help this case.
> 
> A new self test has been added to reproduce the issue and verify the fix.

Marked as reviewed by cstein (Reviewer).

-------------

PR Review: https://git.openjdk.org/jtreg/pull/308#pullrequestreview-3670552021


More information about the jtreg-dev mailing list