RFR: 8315415: OutputAnalyzer.shouldMatchByLine() fails in some cases

Leonid Mesnik lmesnik at openjdk.org
Fri Sep 15 02:33:39 UTC 2023


On Thu, 14 Sep 2023 19:59:53 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> OutputAnalyzer.shouldMatchByLine(from, to, pattern) 
> treat from and to parameters as patterns and not lines. So it might fail to compile them or work not as expected in some cases.
> 
> I grepped the usage of shouldMatchByLine and stdoutShouldMatchByLine and found that in most cases from/to are set to some regex patterns. So I just updated the names of variables and documentation to explicitly say that from/to are patterns.
> 
> See bugs for details. Tested with tier1 (mostly for validation scripts since no code changes.)

The test doesn't use this API. As I understand Calvin find this problem while writing tests, and decided to just to write it other way.

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

PR Comment: https://git.openjdk.org/jdk/pull/15753#issuecomment-1720400430


More information about the hotspot-dev mailing list