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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • None
    • infrastructure
    • None
    • b02

      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.

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

              Created:
              Updated:
              Resolved: