Integrated: 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:29 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.

This pull request has now been integrated.

Changeset: 05833b34
Author:    Jaikiran Pai <jpai at openjdk.org>
URL:       https://git.openjdk.org/jtreg/commit/05833b3498cfc0d1a53b247608b3d4eadbcae2d7
Stats:     51 lines in 4 files changed: 43 ins; 2 del; 6 mod

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

Reviewed-by: cstein

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

PR: https://git.openjdk.org/jtreg/pull/308


More information about the jtreg-dev mailing list