RFR: 8373876: StackWalkNativeToJava print more output in case of failures

David Holmes dholmes at openjdk.org
Wed Dec 17 20:58:13 UTC 2025


On Wed, 17 Dec 2025 14:00:09 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> In case of failures the jtreg test StackWalkNativeToJava sometimes misses to print the 'bad' output we check. This makes analyzing errors hard, so better enhance the output .
> The other checks ` output.shouldNotContain`   print already the diagnostic summary of output.

Not sure there isn't a better way for this test to check what it is checking but this seems okay - modulo pre-existing weirdness.

test/hotspot/jtreg/runtime/ErrorHandling/StackWalkNativeToJava.java line 73:

> 71:         output.shouldNotContain("[error occurred during error reporting (printing native stack");
> 72:         String[] res = output.getOutput().split("StackWalkNativeToJava\\$TestNativeToJavaNative\\.callNativeMethod\\(\\)V");
> 73:         if (res.length - 1 != 2) {

Pre-existing but this is a weird formulation - it should just be  `res.length != 3`.

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28871#pullrequestreview-3589613271
PR Review Comment: https://git.openjdk.org/jdk/pull/28871#discussion_r2628606662


More information about the hotspot-runtime-dev mailing list