jtreg swallows java -version crashing

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • jtreg6.0
    • Affects Version/s: None
    • Component/s: tools
    • None

      When testing a jdk build so broken that "java -version" crashes, jtreg only reports:

      Error: cannot determine version for JDK: <path-to-jdk>

      In particular, whatever error output was printed by java -version is completely swallowed and never reported, and it's not clear from logs that java -version even crashed. This happens because of
      https://github.com/openjdk/jtreg/blob/master/src/share/classes/com/sun/javatest/regtest/tool/Tool.java#L1374-L1376

      JDK_Version v = jdk.getJDKVersion(new SearchPath(jtreg_jar, javatest_jar));
              if (v == null)
                  throw new Fault(i18n, "main.jdk.unknown.version", jdk);

      Instead, jtreg should recognize that calling java crashed and report this explicitly, along with any output of the java process.

            Assignee:
            Ludvig Janiuk (Inactive)
            Reporter:
            Ludvig Janiuk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: