RFR: 8373876: StackWalkNativeToJava print more output in case of failures [v2]
David Holmes
dholmes at openjdk.org
Fri Dec 19 13:07:26 UTC 2025
On Fri, 19 Dec 2025 08:26:48 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/ErrorHandling/StackWalkNativeToJava.java line 77:
>>
>>> 75: }
>>> 76:
>>> 77: assertTrue(res.length == 3, res.length - 1);
>>
>> Suggestion:
>>
>> assertTrue(res.length == 3, res.length);
>>
>> You need to adjust both parts
>
> not sure, in one of our failures with added output it says this
> `java.lang.RuntimeException: Count error: count was 3`
> and indeed, 3 times the pattern we check for is in the output
> StackWalkNativeToJava$TestNativeToJavaNative.callNativeMethod()V
>
> But anyway , nowhere is defined what 'count' really means.
I am assuming that the assertTrue's first argument is the value check of a given variable, and the second is the actual value of that variable. So if we were comparing `length -1` then the actual value is `length-1`. but now we check length then the actual value is length.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28871#discussion_r2635040484
More information about the hotspot-runtime-dev
mailing list