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.
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.