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
Fri Jan 16 11:45:20 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.
Hello Christian,
> Did you run this change against a larger set (the JDK tests) to see whether multiple key tags are present and need manual fixing?
I will be running a CI run for the JDK after building this jtreg version. I expect some existing tests to be caught with more than one `@key` and will JBS issue(s) as appropriate.
-------------
PR Comment: https://git.openjdk.org/jtreg/pull/308#issuecomment-3759663008
More information about the jtreg-dev
mailing list