RFR (S): 7900943: Change '7900913: new @requires tag' breaks JTreg in '-gui' mode

Volker Simonis volker.simonis at gmail.com
Tue Jun 24 09:58:10 UTC 2014


Is somebody reading this list?


On Fri, Jun 6, 2014 at 7:14 PM, Volker Simonis <volker.simonis at gmail.com> wrote:
> Hi,
> could sombody please review and sponsor the following small change
> which fixes a problem of jtreg in '-gui' mode which was introduced by
> change '7900913: new @requires tag':
> https://bugs.openjdk.java.net/browse/CODETOOLS-7900943
> http://cr.openjdk.java.net/~simonis/webrevs/7900943/
> The details are in the bug reported and repeated here for your convenience:
> Change 7900913 introduced the new 'RegressionContext' class which
> calls RegressionParameters.getTestVMJavaOptions() in its constructor.
> This getTestVMJavaOptions() subsequently calls
> getTestJavaOptions()/getTestVMOptions() which in turn may initilize
> the testJavaOpts/testVMOpts to new empty ArrayLists's if there exist
> no corresponding options.
> If JTreg runs in '-gui' mode, it calls
> RegressionParameters.load()/save() before executing tests.
> Unfortunately, saving an empty ArrayList, results in saving an empty
> option string (e.g. "regtest.testJavaOpts="). If such an option is
> loaded back, it will result in ArrayList with an empty string element
> (NOTICE that this is different from the empty ArrayList which was
> saved).
> The ArrayList with the empty string element is finally converted into
> a Java or VM option without a parameter (e.g. "-J ") which breaks the
> test execution (i.e. javac will complain about an empty '-J' option).
> The problem can easily be reproduced by running the jdk regression
> test in GUI mode in following way:
> jtreg -dir:/OpenJDK/jdk9-dev/jdk/test -verbose:summary
> -exclude:/OpenJDK/jdk9-dev/jdk/test/ProblemList.txt -conc:2 -Xmx512m
> -a -ignore:quiet -timeoutFactor:5 -agentvm -gui
> -testjdk:/OpenJDK/output-jdk9-dev-dbg/images/j2sdk-image
> -w:/tmp/JTwork_jdk9_a -r:/tmp/JTreport_jdk9_a :jdk_stable
> If you now choose the test 'com/sun/jdi/BadHandshakeTest.java' for
> execution, it will fail in the compile step, because of an bogus '-J'
> option. This can be verified by looking at the "rerun" string in the
> test's "Test Run Message" tab.
> The problem can be easily fixed by not loading/saving "empty options"
> in RegressionParameters.load()/save0().
> Thank you and best regards,
> Volker

More information about the code-tools-dev mailing list