Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7904084

Unset javaOpts and jtregOpts in jtreg.sh

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • jtreg8.0
    • tools
    • None
    • generic
    • generic

      In jtreg.sh it will combine all the java options and jtreg options in the `for i in "$@"` loop. SHELL use javaOpts and jtregOpts as global varable by default, this means jtreg.sh will receive the value of javaOpts and jtregOpts outside. I think this unexpected.
      To avoid this siutation, I think we should unset javaOpts and jtregOpts before use it.

      Below command demonstrate this bug:

      > jtregOpts=-compilejdk: jtreg -compilejdk: -version
      Error: Duplicate option: -compilejdk
      Usage:
               jtreg options... tests...

            syan Sendao Yan
            syan Sendao Yan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: