RFR: 8285965: TestScenarios.java does not check for "<!-- safepoint while printing -->" correctly

Christian Hagedorn chagedorn at openjdk.java.net
Mon May 30 12:46:42 UTC 2022


On Wed, 11 May 2022 06:13:12 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

> This is another rare occurrence of `` that is not handled correctly by `TestScenarios.java`. 
> 
> We wrongly search this safepoint message in the test VM output with `getTestVMOutput()`:
> 
> https://github.com/openjdk/jdk/blob/9c2548414c71b4caaad6ad9e1b122f474e705300/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/Utils.java#L44-L53
> 
> But this does not help since the IR matcher is parsing the `hotspot_pid` file for IR matching and not the test VM output. We could therefore find this safepoint message in the `hotspod_pid` file and bail out of IR matching while the test VM output does not contain it. This lets `TestScenarios.java` fail. 
> 
> The fix we did for other IR framework tests is to redirect the output of the JTreg test VM itself to a stream in order to search it for ``. We are dumping this message as part of a warning when the IR matcher bails out:
> 
> https://github.com/openjdk/jdk/blob/9c2548414c71b4caaad6ad9e1b122f474e705300/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/IRMatcher.java#L86-L96
> 
> Output for the reported failure:
> 
> Scenario #3 - [-XX:TLABRefillWasteFraction=53]:
> [...]
> Found , bail out of IR matching
> 
> 
> I suggest to use the same fix for `TestScenarios`.
> 
> Thanks,
> Christian

May I get a second review for this?

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

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


More information about the hotspot-compiler-dev mailing list