RFR: 7903030: jtreg should print stdout if JVM gathering properties fails

Igor Ignatyev iignatyev at openjdk.java.net
Fri Oct 15 17:39:15 UTC 2021


Hi all,

could you please review this patch?
from JBS:
> currently, if the JVM, which was created to gather (at-requires) properties, fails for any reason, jtreg prints out "failed to get JDK properties for" message together w/ the exit code. and although jtreg always prints out stderr of this JVM, it might not contain enough information to understand the failure and has caused confusion in past.

testing: run `jtreg -vmoptions:"-Xmx1g -Xms2g"`:

Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size
failed to get JDK properties for /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/java -Xmx1g -Xms2g; exit code 1
Error: failed to get JDK properties for /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/java -Xmx1g -Xms2g; exit code 1

vs old behavior:

failed to get JDK properties for /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/java -Xmx1g -Xms2g; exit code 1
Error: failed to get JDK properties for /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/java -Xmx1g -Xms2g; exit code 1


Thanks,
-- Igor

-------------

Commit messages:
 - print stdout on failure to gather properties

Changes: https://git.openjdk.java.net/jtreg/pull/28/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jtreg&pr=28&range=00
  Issue: https://bugs.openjdk.java.net/browse/CODETOOLS-7903030
  Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jtreg/pull/28.diff
  Fetch: git fetch https://git.openjdk.java.net/jtreg pull/28/head:pull/28

PR: https://git.openjdk.java.net/jtreg/pull/28


More information about the jtreg-dev mailing list