RFR: 8358600: Template-Framework Library: Template for TestFramework test class [v3]

Christian Hagedorn chagedorn at openjdk.org
Thu Jun 12 08:08:30 UTC 2025


On Thu, 5 Jun 2025 12:01:17 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> We might want to write many IR/TestFramework tests, and so I would like to integrate a Template that generates the class, and the user has to only generate a list of tests.
>> 
>> This is a first extension for https://github.com/openjdk/jdk/pull/24217. I had already prototyped it earlier and plan to use it in multiple tests https://github.com/openjdk/jdk/pull/23418 (see `IRTestClass.java`).
>> 
>> https://github.com/openjdk/jdk/blob/dc640cbd8fb8ec76920a7ab52dfe7955ed1d77f2/test/hotspot/jtreg/compiler/lib/template_framework/library/TestFrameworkClass.java#L36-L45
>
> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review suggestions

Otherwise, looks good!

test/hotspot/jtreg/compiler/lib/template_framework/library/TestFrameworkClass.java line 95:

> 93:             // --- CLASS_HOOK insertions start ---
> 94:             """,
> 95:             Hooks.CLASS_HOOK.anchor(

Ah, so I can insert here from my `testTemplateTokens` right? Do you also want to show an example in `TestWithTestFrameworkClass` that this is possible? Maybe we can also add something in the description above since I only got aware of that now when seeing this `anchor()`.

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

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25643#pullrequestreview-2919828653
PR Review Comment: https://git.openjdk.org/jdk/pull/25643#discussion_r2141902484


More information about the hotspot-compiler-dev mailing list