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

Let jvmtiGen exit with a non-zero exit code upon failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None
    • b94
    • generic
    • generic

      This is the email message from Carsten Varming:

      jvmtiGen is used to process a number of xml and xslt files in OpenJDK.
      Currently jvmtiGen exits with exit code 0 regardless of its success. This
      causes make to often consider a target finished when in fact the target
      failed. It also leads to funny error checking after the execution of
      jvmtiGen. For instance, in many trace.make files[*] a test for the
      existence of the output file is carried out after the completion of
      jvmtiGen. In a clean working repository that test is equivalent to jvmtiGen
      exiting with a proper exit failure code on failure, but in a dirty working
      repository the target file might just be pre-existing. This causes
      unnecessary pain when working with files processed by jvmtiGen.

      In this change I chose to exit with exit code 1 whenever a failure is
      detected, be it a dtd validation failure, an IO failure, or something else
      entirely. This halts the building of OpenJDK on failures and ultimately
      makes development easier. I also added a verbose option such that warnings
      from the xml parser and dtd checker can be printed on stderr if desired.
      Finally, I changed all the error message printing to stderr. :-)

      Let me know what you think.

            sspitsyn Serguei Spitsyn
            sspitsyn Serguei Spitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: