RFR: 8344942: Template-Based Testing Framework [v16]
Emanuel Peter
epeter at openjdk.org
Wed May 14 14:36:07 UTC 2025
On Wed, 14 May 2025 11:51:03 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> more documentation fixes
>
> test/hotspot/jtreg/compiler/lib/template_framework/README.md line 6:
>
>> 4: We want to make it easy to generate variants of tests. Often, we would like to have a set of tests, corresponding to a set of types, a set of operators, a set of constants, etc. Writing all the tests by hand is cumbersome or even impossible. When generating such tests with scripts, it would be preferable if the code generation happens automatically, and the generator script was checked into the code base. Code generation can go beyond simple regression tests, and one might want to generate random code from a list of possible templates, to fuzz individual Java features and compiler optimizations.
>> 5:
>> 6: The Template Framework provides a facility to generate code with Templates. Templates are essencially a list of tokens that are concatenated (i.e. rendered) to a String. The Templates can have "holes", which are filled (replaced) by different values at each Template instantiation. For example, these "holes" can be filled with different types, operators or constants. Templates can also be nested, allowing a modular use of Templates.
>
> Suggestion:
>
> The Template Framework provides a facility to generate code with Templates. A Template is essentially a list of tokens that are concatenated (i.e. rendered) to a String. The Templates can have "holes", which are filled (replaced) by different values at each Template instantiation. For example, these "holes" can be filled with different types, operators or constants. Templates can also be nested, allowing a modular use of Templates.
Nice, fixed :)
> test/hotspot/jtreg/compiler/lib/template_framework/Template.java line 46:
>
>> 44: *
>> 45: * <p>
>> 46: * The Template Framework provides a facility to generate code with Templates. Templates are essencially a list
>
> Same grammar/spelling glitch as in the README file.
Fixed!
> test/hotspot/jtreg/compiler/lib/template_framework/Template.java line 405:
>
>> 403:
>> 404: /**
>> 405: * The default amount of fuel spent per Template. It is suptracted from the current {@link #fuel} at every
>
> Suggestion:
>
> * The default amount of fuel spent per Template. It is subtracted from the current {@link #fuel} at every
Manuel already caught it!
> test/hotspot/jtreg/compiler/lib/template_framework/Template.java line 411:
>
>> 409:
>> 410: /**
>> 411: * The current remaining fuel for nested Templates. Every level of Template nestig
>
> Suggestion:
>
> * The current remaining fuel for nested Templates. Every level of Template nesting
Manuel already caught it!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2089100667
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2089099220
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2089096506
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2089097427
More information about the hotspot-compiler-dev
mailing list