RFR: 8285965: TestScenarios.java does not check for "<!-- safepoint while printing -->" correctly
Christian Hagedorn
chagedorn at openjdk.java.net
Wed May 11 06:59:12 UTC 2022
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
-------------
Commit messages:
- 8285965: TestScenarios.java does not check for "<!-- safepoint while printing -->" correctly
Changes: https://git.openjdk.java.net/jdk/pull/8647/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8647&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8285965
Stats: 38 lines in 2 files changed: 11 ins; 16 del; 11 mod
Patch: https://git.openjdk.java.net/jdk/pull/8647.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8647/head:pull/8647
PR: https://git.openjdk.java.net/jdk/pull/8647
More information about the hotspot-compiler-dev
mailing list