RFR: 8271471: [IR Framework] Rare occurrence of "<!-- safepoint while printing -->" in PrintIdeal/PrintOptoAssembly can let tests fail [v3]

Christian Hagedorn chagedorn at openjdk.java.net
Tue Aug 10 09:33:57 UTC 2021


On Tue, 10 Aug 2021 08:25:44 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Replace RuntimeException by ShouldHaveCaughtException
>
> test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/Utils.java line 31:
> 
>> 29: 
>> 30: public class Utils {
>> 31:     public static void shouldHaveCaughtException() {
> 
> Should these methods be renamed to `shouldHaveThrownException`? Because that method could also be used in a context where we don't catch.

Agreed, that's a better name!

> test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/Utils.java line 48:
> 
>> 46:             throw new ShouldHaveCaughtException();
>> 47:         }
>> 48:     }
> 
> Why don't we simply do:
> 
>     for (Scenario s : scenarios) {
>         shouldHaveCaughtException(s.getTestVMOutput());
>     }

I changed that code, see comment below.

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

PR: https://git.openjdk.java.net/jdk/pull/4932


More information about the hotspot-compiler-dev mailing list