Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235997

JMH test runner should quote VM_OPTIONS and JAVA_OPTIONS sent to -jvmArgs

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 15
    • Component/s: infrastructure
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b02

      Description

      Running a micro with multiple flags in JAVA_- or VM_OPTIONS results in a parsing error:

      make test TEST=micro:FloatingDecimal.randomDoubleToString MICRO="VM_OPTIONS=-Xmx4g -Xms4g"
      Building configuration 'linux-x64' (matching CONF_NAME=linux-x64)
      Building configuration 'linux-x64' (matching CONF_NAME=linux-x64)
      Building target 'test' in configuration 'linux-x64'
      Running tests using MICRO control variable 'VM_OPTIONS=-Xmx4g -Xms4g'
      Test selection 'micro:FloatingDecimal.randomDoubleToString', will run:
      * micro:FloatingDecimal.randomDoubleToString

      Running test 'micro:FloatingDecimal.randomDoubleToString'
      Error parsing command line:
       'X' is not a recognized option

      Quoting the values using $(call ShellQuote, $$... $$..) seem like the right thing to do here.

        Attachments

          Activity

            People

            • Assignee:
              redestad Claes Redestad
              Reporter:
              redestad Claes Redestad
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: