RFR: 8288912: vmTestbase/nsk/stress/strace/strace002.java fails with Unexpected method name: currentCarrierThread

David Holmes dholmes at openjdk.org
Mon Feb 20 01:59:24 UTC 2023


On Sat, 18 Feb 2023 19:09:36 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> The fix simplifies stack verification. It doesn't check the method name for system classes.
> The StraceBase is used as a base class, not a utility class, to simplify future refactoring.

Refactoring to avoid all the code checking duplication is a good idea. Not so sure about relaxing things so that it only has to match the class, not the method. I have to question what these tests are actually trying to test in that case - and whether we need all these different variants.

BTW many of the test descriptions list the expected methods too and so are not accurate.

Thanks.

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/StraceBase.java line 51:

> 49:     }
> 50:     /**
> 51:      *   Method verifies that StackTraceElement is sane and might be expected it the current stack.

s/it/in/

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/StraceBase.java line 56:

> 54:         String className = element.getClassName();
> 55:         String methodName = element.getMethodName();
> 56:         if (!isValidJavaName(className) || !isValidJavaName(methodName)) {

You've pulled the class and method names out of a stacktrace element - how can they not be valid java names ???

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

PR: https://git.openjdk.org/jdk/pull/12638


More information about the hotspot-runtime-dev mailing list