JDK-8016703 : TEST_BUG: 3 regression tests fail with new JTREG 4.1 b06
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6u51
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-05-28
  • Updated: 2014-07-21
  • Resolved: 2013-07-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u60 b05Fixed
Related Reports
Relates :  
Description
Testsuite name: Regression
Test names:
 tools/javac/processing/errors/TestOptionSyntaxErrors.java
 tools/javac/processing/errors/TestReturnCode.java
 tools/javac/warnings/Serial.java
JDK tested: 6u51 b09
OS tested: Solaris x86
Is it a regression: No

Tests pass with JTREG 3.2 and fail with JTREG 4.1

Comments
Verified 6u60 b05 linux
23-07-2013

Fix ready. I am submitting SA request now
09-07-2013

6u51 has been released. So, please fix it in 6u60.
21-06-2013

The attached patch works now with jtreg-4.1-dev
17-06-2013

Sigh I was hoping we don't have to do that.
17-06-2013

See JDK-7074189. You probably need to backport the fix.
15-06-2013

This is most likely related to the fact that newer versions of jtreg will treat command line issues as an Error result, not a Failed result. Error results are not turned into Pass by /fail. The fix is to modify the tests. See the modified version of the tests in JDK 8.
15-06-2013

The proposed fix is inappropriate. The result codes in JDK 6 are the same as today jdk1.6.0 /** Result codes. */ static final int EXIT_OK = 0, // Compilation completed with no errors. EXIT_ERROR = 1, // Completed but reported errors. EXIT_CMDERR = 2, // Bad command-line arguments EXIT_SYSERR = 3, // System error or resource exhaustion. EXIT_ABNORMAL = 4; // Compiler terminated abnormally 6u51 /** Result codes. */ static final int EXIT_OK = 0, // Compilation completed with no errors. EXIT_ERROR = 1, // Completed but reported errors. EXIT_CMDERR = 2, // Bad command-line arguments EXIT_SYSERR = 3, // System error or resource exhaustion. EXIT_ABNORMAL = 4; // Compiler terminated abnormally 8 /** Result codes. */ public enum Result { OK(0), // Compilation completed with no errors. ERROR(1), // Completed but reported errors. CMDERR(2), // Bad command-line arguments SYSERR(3), // System error or resource exhaustion. ABNORMAL(4); // Compiler terminated abnormally So there should be no need to change jtreg handling of javac exit codes
15-06-2013

This is a jtreg bug, potential fix: diff --git a/src/share/classes/com/sun/javatest/regtest/CompileAction.java b/src/share/classes/com/sun/javatest/regtest/CompileAction.java --- a/src/share/classes/com/sun/javatest/regtest/CompileAction.java +++ b/src/share/classes/com/sun/javatest/regtest/CompileAction.java @@ -615,10 +615,10 @@ } // parseRef() static Status getStatusForJavacExitCode(JDK.Version v, int exitCode) { - if (v == null || v.compareTo(JDK.Version.V1_6) < 0) + if (v == null || v.compareTo(JDK.Version.V1_7) < 0) return (exitCode == 0 ? passed : failed); - // The following exit codes are standard in JDK 6 or later + // The following exit codes are standard in JDK 7 or later switch (exitCode) { case 0: return passed; case 1: return failed;
15-06-2013

This is reproducible with the latest version of jtreg, it appears that these tests may need to be fixed.
06-06-2013

All comments about jtreg 3.2 are irrelevant and will be ignored. That is an OBSOLETE version of jtreg and should NOT be used to run the latest tests. If the tests are indeed failing with recent builds of 4.1, then that is indeed relevant and will be investigated.
06-06-2013