On Thu, 30 Oct 2025 22:53:59 GMT, Ioi Lam <[email protected]> wrote:

> In the previous fix (https://github.com/openjdk/jdk/pull/28035), I added 
> `OutputAnalyzer::match(String regexp)`, but it didn't work because by default 
> regular expressions do not match across newlines.
> 
> I fixed this by re-working `OutputAnalyzer::match()`, etc, to use 
> `Pattern.MULTILINE`.
> 
> I tried rerunning the test on macos 26 but couldn't reproduce the condition 
> in the bug report. However, I added sanity test in this version 
> (https://github.com/openjdk/jdk/commit/e690e97262575d083017635fa837ab267686bfe9)
>  and the new regexp seems to catch the output and correctly come to this part 
> of the test case:
> 
> 
> if (forceBase >= end) {
>     throw new SkippedException("Failed to force ccs to any of the given 
> bases. Skipping test.");
> }

I'm skeptical to adding MULTILINE to all users of these regex functions. And 
with that said, something is fishy here. Why do you need to match over multiple 
lines? I see that the bug report makes it look like you have multiple lines, 
but the linked output from the test doesn't have them. Could you give a more 
comprehensive explanation what this solves?

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

PR Comment: https://git.openjdk.org/jdk/pull/28077#issuecomment-3471601865

Reply via email to