On Wed, Jul 5, 2017 at 7:36 PM, Thomas Stüfe <thomas.stu...@gmail.com> wrote: > Hi Volker, > > this seems fine, but why did you add the error output? None of the other > vmXX() functions seem not to do this. >
I didn't wanted to blow up the change but you're probably right so I've updated all the functions which potentially returned 'null' to also print a stack trace in that case: http://cr.openjdk.java.net/~simonis/webrevs/2017/8183534.v1/ The problem is that without error output, JTreg will simply fail with: java.lang.NullPointerException Error: failed to get JDK properties for /sapjvm_9/bin/java ; exit code 1 which gives you no clue where to search for the problem. With my change you'll get a stack trace before the error which clearly indicates the location of the problem: java.lang.Exception: Can't get 'java.vm.info' property at requires.VMProps.nullWithException(VMProps.java:87) at requires.VMProps.vmCompMode(VMProps.java:133) at requires.VMProps.call(VMProps.java:62) at requires.VMProps.call(VMProps.java:48) at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:66) at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:46) java.lang.NullPointerException Error: failed to get JDK properties for /bas/sapjvm/integ/all/gen/optU/linuxx86_64/output/sapjvm_9/bin/java ; exit code 1 Thank you and best regards, Volker > Kind Regards, Thomas > > On Tue, Jul 4, 2017 at 11:05 AM, Volker Simonis <volker.simo...@gmail.com> > wrote: >> >> Hi, >> >> can you please review the following trivial change which makes the >> detection of compilation mode for JTreg more robust: >> >> http://cr.openjdk.java.net/~simonis/webrevs/2017/8183534/ >> https://bugs.openjdk.java.net/browse/JDK-8183534 >> >> The compilation mode in JTreg is parsed from the "java.vm.info" system >> property. The current implementation expects that "java.vm.info" >> contains exactly one of the strings "mixed mode", "compiled mode" or >> "interpreted mode" otherwise the detection will fail and JTreg will >> quit with an error. >> >> The detection can be done more robust by searching for the substrings >> "mixed mode", "compiled mode" or "interpreted mode" instead, thus >> allowing OpenJDK builders to store additional information in the >> "java.vm.info" system property. >> >> Thank you and best regards, >> Volker > >