Running OpenJDK regression tests with 'jtreg -gui' fails

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue Oct 1 19:06:37 PDT 2013


On 10/01/2013 09:13 AM, Volker Simonis wrote:
> Hi,
>
> maybe this is a silly question, but I'm not able to run the jtreg
> tests from jdk/tests directory in GUI mode (i.e. by running jtreg with
> the '-gui' option).
>
> If I run the test from the command line, everything works perfect. E.g.
>
> JT_JAVA=/jdk1.7.0_09 /jtreg/linux/bin/jtreg -jdk:/jdk1.7.0_09
> -w:/tmp/JTwork -r:/tmp/JTreport -v java/lang/Boolean
>
> successfully runs the 4 tests under java/lang/Boolean.
>
> If I however use:
>
> JT_JAVA=/jdk1.7.0_09 /jtreg/linux/bin/jtreg -jdk:/jdk1.7.0_09
> -w:/tmp/JTwork -r:/tmp/JTreport -v -gui java/lang/Boolean
>
> the jtreg-GUI appears and lists all the JDK tests in the left window.
> Now no difference which tests I select and execute, they always fail
> with the error " Error. Unexpected exception caught from test
> java/lang/Byte/Decode.java: java.lang.NullPointerException". The stack
> trace looks as follows:
>
> java.lang.NullPointerException
>      at com.sun.javatest.regtest.RegressionScript.run(RegressionScript.java:135)
>      at com.sun.javatest.Script.run(Script.java:228)
>      at com.sun.javatest.DefaultTestRunner.runTest(DefaultTestRunner.java:167)
>      at com.sun.javatest.DefaultTestRunner.access$100(DefaultTestRunner.java:43)
>      at com.sun.javatest.DefaultTestRunner$1.run(DefaultTestRunner.java:66)
>
> It seems that for some reason, the Java-files are not compiled to
> classfiles and executed as shell scripts, but I have no idea why this
> happens. As stated before, without the '-gui' option, everything works
> perfectly.
>
> Any idea what I'm doing wrong?
>
> Thank you and best regards,
> Volker
>
> PS: I've tested this with different java version (from 6 to 8) and
> different jtreg versions (4.1-bin-b02 and 4.1-bin-b05) on Ubuntu 12.04
> Linux all with the same result.

Volker,

I played with this a bit but could not exactly recreate your failure.
The java/lang/Boolean tests always passed for me, but I did see
compilation errors for the subsequent tests (e.g. java/lang/Byte)
when using jtreg b05.   (I got a message about -J followed by a
space.  But when I switched to using the latest version of jtreg,
all those problems went away.

So, as much as I don't like it when someone asks, "have you tried
the latest version?", I have to ask, "have you tried the latest version
of jtreg?".

Also, for the stack trace you reported, what version of jtreg were
you using at the time?

-- Jon



More information about the jtreg-use mailing list