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

Jaikiran Pai jpai at openjdk.org
Tue Jan 20 09:27:28 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.

Thank you Christian for the review. The JDK specific test issues are being addressed and this change on its own went fine in the testing. I will go ahead and integrate this now.

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

PR Comment: https://git.openjdk.org/jtreg/pull/308#issuecomment-3771862074


More information about the jtreg-dev mailing list