RFR: 8253872: ArgumentHandler must use the same delimiters as in jvmti_tools.cpp [v2]

Chris Plummer cjplummer at openjdk.java.net
Wed Sep 30 20:00:12 UTC 2020


On Wed, 30 Sep 2020 19:02:07 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

>> separating the commit from  #370 / [8252003](https://bugs.openjdk.java.net/browse/JDK-8253872)[[1]]
>> 
>> jvmti_tools.cpp supports ` `, `~` and/or `,` as delimiters[[2]] in -agentlib options, but
>> `nsk/share/jvmti/ArgumentHandler` takes these options (via `getAgentOptionsString`) and then parse in
>> `parseOptionString`, where `StringTokenizer` is used w/ default delimiters, ie `\t\n\r\f`, and as a result, it doesn't
>> split options correctly in tests which use delimiters other than ` `. and in fact,
>> `nsk/jvmti/scenarios/contention/TC05/tc05t001` is using `,` and gets wrong options/values.  testing: ✅
>> `nsk/jvmti/scenarios/contention/TC05/tc05t001`  [1]:
>> https://github.com/openjdk/jdk/pull/370/commits/5219b11650c00f9af5564758b3292458a48e7f21#r497658983  [2]:
>> https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp#L224
>
> Igor Ignatyev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   reorder delimiters

Marked as reviewed by cjplummer (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/438


More information about the serviceability-dev mailing list