RFR: 8365262: [IR-Framework] Add simple way to add cross-product of flags

Galder Zamarreño galder at openjdk.org
Thu Aug 14 12:45:16 UTC 2025


On Wed, 13 Aug 2025 14:38:01 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

> This PR adds the `TestFramework::addCrossProductScenarios` method to enable more ergonomic testing of the combination of all flag combinations. To illustrate its use, I also converted one test to use the new cross product functionality.
> 
> Testing:
>  - [x] Github Actions
>  - [x] tier1,tier2 plus some internal testing on Oracle supported platforms

Thanks @mhaessig. Nice API improvement! I'm a bit unsure about the way it's tested though.

test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestScenariosCrossProduct.java line 49:

> 47:                                                "-XX:TLABRefillWasteFraction=64"));
> 48:             t1.start();
> 49:             Asserts.fail("Should have thrown exception");

Hmmm, why do the tests fail? I'm wondering if a simpler way to test the functionality is possible that doesn't require having to figure out failure modes? Maybe some kind of positive test that counts number of test scenarios run?

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

Changes requested by galder (Author).

PR Review: https://git.openjdk.org/jdk/pull/26762#pullrequestreview-3120445726
PR Review Comment: https://git.openjdk.org/jdk/pull/26762#discussion_r2276521299


More information about the hotspot-compiler-dev mailing list