United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7074189 some javac tests fail with latest jtreg 4.1 b03
JDK-7074189 : some javac tests fail with latest jtreg 4.1 b03

Details
Type:
Bug
Submit Date:
2011-08-02
Status:
Closed
Updated Date:
2013-06-15
Project Name:
JDK
Resolved Date:
2012-04-20
Component:
tools
OS:
generic
Sub-Component:
javac
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7,8
Fixed Versions:

Related Reports
Backport:
Duplicate:
Relates:
Relates:
Relates:

Sub Tasks

Description
3 tests fail using jtreg 4.1 b03

                                    

Comments
EVALUATION

1. test/tools/javac/warnings/Serial.java

The action 
 * @compile/fail -Werror -Xlint:all,-path T4994049/ Serial.java
is nonsensical, and succeeding because the compilation fails for the wrong reason.

The line should be deleted.
                                     
2011-08-03
EVALUATION

There are three test failures:

tools/javac/processing/errors/TestOptionSyntaxErrors.java
tools/javac/processing/errors/TestReturnCode.java
tools/javac/warnings/Serial.java
                                     
2011-08-03
EVALUATION

2.  The other two tests are expecting "less common" exit codes from javac. The best way to fix them is to write a library class, CompileFail, which emulates @compile/fail but which also allows the specific exit code to be tested.
                                     
2011-08-03
EVALUATION

Hmmm, we've uncovered a curiousity in TestReturnCode.java.   Errors thrown from annotation processors are treated different (and less severely) than exceptions.

Errors cause EXIT_ERROR, exit code 1, equivalent to a compile-time error

Exceptions cause EXIT_SYSERR, exit code 3, system error or resource exhaustion
                                     
2011-08-03



Hardware and Software, Engineered to Work Together