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

jtreg check for macos version should take into account the process exit code

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • jtreg7.1
    • jtreg7.0
    • tools
    • None
    • os_x

    Description

      The jtreg code has specific check for macos to get the version reported by the OS and then compare it to the value of the "os.version" Java system property. To do this, the jtreg code uses ProcessBuilder to launch a macos command which prints out the version. The printed version is then considered as the expected version and compared against the value of os.version. https://github.com/openjdk/jtreg/blob/master/src/share/classes/com/sun/javatest/regtest/tool/Tool.java#L195

      If the command runs into any error and the process exits with a non-zero code, then right now, any error message written out by the process ends up being considered as the expected version and then compared against the "os.version" system property.

      This code can be improved to compare the process output with the "os.version" value, only when the process exits successfully (i.e. exit code = 0).

      Attachments

        Issue Links

          Activity

            People

              jjg Jonathan Gibbons
              jpai Jaikiran Pai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: