RFR: 8235997: JMH test runner should quote VM_OPTIONS and JAVA_OPTIONS sent to -jvmArgs
Claes Redestad
claes.redestad at oracle.com
Tue Dec 17 11:57:04 UTC 2019
Thanks, Erik!
/Claes
On 2019-12-17 12:32, Erik Joelsson wrote:
> Looks good.
>
> /Erik
>
> On 2019-12-16 04:27, Claes Redestad wrote:
>> Hi,
>>
>> please review this patch[1] which makes the JMH behave more
>> in line with expectations when adding multiple flags using
>> the VM_OPTIONS and JAVA_OPTIONS control variables.
>>
>> E.g., these fail before the patch:
>>
>> make test TEST=... MICRO="VM_OPTIONS=-Xmx4g -Xms4g"
>> make test TEST=... MICRO="JAVA_OPTIONS=-Xmx4g -Xms4g"
>>
>> Current workaround is to escape the spaces, which will fail with
>> the proposed patch. Substituting escaped spaces with normal
>> spaces seems out of scope, though.
>>
>> Thanks!
>>
>> /Claes
>>
>> [1]
>>
>> diff -r 075c1d68ae8c make/RunTests.gmk
>> --- a/make/RunTests.gmk Mon Dec 16 10:49:36 2019 +0100
>> +++ b/make/RunTests.gmk Mon Dec 16 13:32:03 2019 +0100
>> @@ -701,7 +701,8 @@
>> endif
>>
>> ifneq ($$(MICRO_VM_OPTIONS)$$(MICRO_JAVA_OPTIONS), )
>> - $1_MICRO_VM_OPTIONS := -jvmArgs $$(MICRO_VM_OPTIONS)
>> $$(MICRO_JAVA_OPTIONS)
>> + JMH_JVM_ARGS := $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
>> + $1_MICRO_VM_OPTIONS := -jvmArgs $(call ShellQuote,$$(JMH_JVM_ARGS))
>> endif
>>
>> ifneq ($$(MICRO_ITER), )
More information about the build-dev
mailing list