RFR: 8353955: nsk/jdi tests should be fixed to not always require includevirtualthreads=y
Chris Plummer
cjplummer at openjdk.org
Thu Apr 17 02:07:00 UTC 2025
On Thu, 17 Apr 2025 00:55:10 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> Used approach (call a special method of Binder class) is different from standard way of nsk framework to customize test settings.
> Standard way assumes settings like this are specified in "@run" as an option (like "-includevirtualthreads=y" or "-includevirtualthreads"),
> ArgumentHandler parses it (in this case maybe it should be parsed by nsk/share/jpda/DebugeeArgumentHandler.java) and provides a method to get the value,
> Binder calls the method and sets connector argument.
> I'm not a fun of this approach, but I think that handling different settings in different ways would make the code even harder to understand
I had considered the -includevirtualthreads approach, but I find nsk argument parsing to be very opaque (abstract?), and the argument handling scattered in various places. It was a challenge to figure out how the -includevirtualthreads option would be made visible to Binder. I think with your suggestions I might now have enough info to proceed with that approach, so I'll give it a try.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24606#issuecomment-2811534310
More information about the serviceability-dev
mailing list