JDK-7001389 : testNegativeModelWithSystemCompiler test fails in org.eclipse.jdt.compiler.apt.tests package
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P5
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2010-11-19
  • Updated: 2010-12-09
  • Resolved: 2010-12-09
Related Reports
Relates :  
Description
Eclipse 3.4.2 is used for compatibility testing with jdk7 and testNegativeModelWithSystemCompiler test fails in org.eclipse.jdt.compiler.apt.tests package starting from b116 on all platforms:
No property - probably processing did not take place
junit.framework.AssertionFailedError: No property - probably processing did not take place
at org.eclipse.jdt.compiler.apt.tests.NegativeTests.internalTestNegativeModel(NegativeTests.java:158)
at org.eclipse.jdt.compiler.apt.tests.NegativeTests.testNegativeModelWithSystemCompiler(NegativeTests.java:50)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
at org.eclipse.core.launcher.Main.main(Main.java:30) 

Results location:
http://jsqalab.sfbay.sun.com/results/Evergreen/7/1.7.0b118/compatibility_eclipse/solaris10-sun4u/rerun/jdtcompilerapt/results/html/org.eclipse.jdt.compiler.apt.tests_solaris.gtk.sparc.html

How to reproduce:
solaris: soda.sfbay.sun.com (vnc access: dtftest/dtf_test)
testsuite location: /home1/dtftest/eclipse/eclipse-testing 
Run tests on sparc:
$sh runtests -properties . -os solaris -ws gtk -arch sparc -noclean jdtcompilerapt -vm /net/koori/onestop/jdk/7/promoted/all/b118/binaries/solaris-sparc/bin/java

The tests are passed if run with b115:
$sh runtests -properties . -os solaris -ws gtk -arch sparc -noclean jdtcompilerapt -vm /net/koori/onestop/jdk/7/promoted/all/b115/binaries/solaris-sparc/bin/java

Comments
EVALUATION javac's behavior is correct.
09-12-2010

EVALUATION By experimenting, it is clear the guesses in the previous comment were correct, and that this test is a function of the classes in Negative?.java. Despite the comment, NegativeTest2 also contains semantic errors other than missing types. However, I have not been able to find any changes that I can make to Negative2 and Negative4 to allow them to compile and the test to pass. And, the test does not appear to save the output from the compilation, to give any indication of why the test is failing. But, javac can process the annotations on all files except 2 and 4 because I can run them with -Xprint successully. FWIW, the source for NegativeTests.java can be found here: http://www.java2s.com/Open-Source/Java-Document/IDE-Eclipse/jdt/org/eclipse/jdt/compiler/apt/tests/NegativeTests.java.htm But, that just references a class called org.eclipse.jdt.compiler.apt.tests.processors.negative.NegativeModelProc and I've not yet found the source for that class.
19-11-2010

EVALUATION The attachment contains incomplete source code, and the posted results do not contain enough results to debug this much further. The stacktrace indicates a failure in org.eclipse.jdt.compiler.apt.tests.NegativeTests but that class only exists as a compiled class file in compilerapttests.jar. There is no source file for NegativeTests.java That being said, it looks like the NegativeTests class might be testing the various source files in ./resources/targets/negative/pa/Negative?.java, but if that is the case, the posted results do not identify which Negative?.java test case is failing. Of these: Negative1: missing types only Negative2: missing types only Negative3: missing types only Negative4: This code contains missing types and generic types with incorrect parameters. Negative5: missing types only Negative6: missing types only, including missing annotation types Negative7: missing types only, including missing annotation types Negative8: missing interfaces Of these, I would expect javac to not perform annotation processing on Negative4, because of the (deliberate) errors in that source file. So, from what I can see, if the test is doing what I'm guessing it is doing, then javac's behaviour is correct and within spec. If you can't change the source of the test, we have a choice of some or all of the following options: 1) close this bug as Closed/NotABug 2) Determine if it is possible to ignore Negative4.java, so that we can verify the behavior of javac on the other Negative?.java files 3) File a bug against Negative4.java with Eclipse 4) Ignore this complete test or ignore the failure when you run the test
19-11-2010

EVALUATION Please provide the test program that failed. This looks like a side effect of the deliberate change to stop javac execution earlier in the face of unrecoverable errors (6403465), in which case this bug either needs to be Closed/NotABug or reassigned to an SQE category to change/update/ignore the test.
19-11-2010