The test has two issues. The first is that it assume that once the VMStart event has arrived and one "step into" is done, it will be in the main method of the debuggee. Once there, it determines the debuggee class name by looking at the classtype of topmost frame. The problems is when using virtual threads, it is actually in TestScaffold.main() at this point, so the wrong class name is gleaned from the frame. To fix this the test just saves away the debuggee class name, which is passed to the test as the 4th argument.
The other issue is that the test assumes once it gets to the debuggee go() method, there are only two frames on the stack. It's more like 16 when using virtual threads. The test needs to account for this by counting the number of frames when go() is entered rather than assuming it will be 2. Tested locally with and without the wrapper and by running tier5 svc tests. ------------- Commit messages: - Fix StepTest for virtual threads wrapper Changes: https://git.openjdk.org/jdk/pull/14307/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14307&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8309420 Stats: 21 lines in 2 files changed: 10 ins; 4 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/14307.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14307/head:pull/14307 PR: https://git.openjdk.org/jdk/pull/14307