Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368246

Summary: Test failures in official build
Product: [Eclipse Project] PDE Reporter: Dani Megert <daniel_megert>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, curtis.windatt.public, irbull, t-oberlies, tjwatson
Version: 3.7.1   
Target Milestone: 3.8 M6   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Bug Depends on: 352457, 369834    
Bug Blocks:    

Comment 1 Dani Megert CLA 2012-01-24 09:42:26 EST
Ping.
Comment 2 Curtis Windatt CLA 2012-01-26 11:31:59 EST
For reference:

Unable to read repository at jar:file:/Users/ibmemployee/buildtest/I20120125-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/publishShape/I.TestBuild/f-TestBuild-group.group.group.zip!/content.xml.

org.eclipse.equinox.p2.core.ProvisionException: Unable to read repository at jar:file:/Users/ibmemployee/buildtest/I20120125-1800/eclipse-testing/test-eclipse/eclipse/pdebuild_folder/pde.build/publishShape/I.TestBuild/f-TestBuild-group.group.group.zip!/content.xml.
at org.eclipse.equinox.internal.p2.repository.CacheManager.updateCache(CacheManager.java:359)
at org.eclipse.equinox.internal.p2.repository.CacheManager.createCache(CacheManager.java:205)
at org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory.getLocalFile(SimpleMetadataRepositoryFactory.java:66)
at org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory.load(SimpleMetadataRepositoryFactory.java:88)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:749)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:651)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
at org.eclipse.pde.build.internal.tests.p2.P2TestCase.loadMetadataRepository(P2TestCase.java:99)
at org.eclipse.pde.build.internal.tests.p2.PublishingTests.testShape_267506(PublishingTests.java:1007)
at org.eclipse.pde.build.tests.PDETestCase.runTest(PDETestCase.java:61)
Comment 3 Andrew Niefer CLA 2012-01-26 13:32:21 EST
I took a look at the failures.  

testShape_267506 is the stack trace from comment #2, it is a problem with p2 reading a zipped repository.  The file exists and appears to be valid.  I raised bug 369834 on p2.

The other failure testBug268498 is a real problem.  Back in 3.7 p2 copied some PDE/Build classes and made some changes, bug 342550 removed the PDE/Build versions of these classes.  The failure is caused by a difference in behaviour between the p2 and pde versions.
Comment 4 Dani Megert CLA 2012-01-26 13:41:26 EST
> The other failure testBug268498 is a real problem.  Back in 3.7 p2 copied some
> PDE/Build classes and made some changes, bug 342550 removed the PDE/Build
> versions of these classes.  The failure is caused by a difference in behaviour
> between the p2 and pde versions.

What's the impact of this? Does it need to be addressed for M5?
Comment 5 Andrew Niefer CLA 2012-01-26 14:25:28 EST
The impact of this is that product exports/builds targeting macosx will fail on case sensitive file systems if the branding name for the launcher is left blank, or is specified as "eclipse" or "launcher".

The specific problem is that for mac, a launcher name of "some_name" was branded by PDE/Build as "some_name.app/Contents/MacOS/some_name".

p2 added a special case if the name is "eclipse" (or "launcher"), then it will capitalize the first letter and brand as "Eclipse.app/Contents/MacOS/eclipse" instead of "eclipse.app/Contents/MacOS/eclipse".

So far I've found 2 places in PDE/Build where the miss-match between "eclipse.app" vs "Eclipse.app" causes failures.  First is when generating p2 chmod instructions in BrandP2Task#brandTouchpointData.  The fix here is relatively simple.  

The second is in the ant scripts for archiving the results and preserving the executable bit on the launcher.  The fix here would be much more complex, and would require some thought.

Given that there are no active PDE/Build commiters, I would suggest the safest way forward is to revert at least the branding related portions of bug 342550.
Comment 6 Ian Bull CLA 2012-01-26 14:55:55 EST
I'm looking at this now. I'm not sure I understand why a mismatch in version classes is causing a problem with case sensitive launcher names, but I'm sure that will become clear once I look at the code.
Comment 7 Dani Megert CLA 2012-02-07 06:21:20 EST
Ping!

Different tests fail on different platforms/JREs.
Comment 8 John Arthorne CLA 2012-02-07 13:59:07 EST
(In reply to comment #3)
> The other failure testBug268498 is a real problem.  Back in 3.7 p2 copied some
> PDE/Build classes and made some changes, bug 342550 removed the PDE/Build
> versions of these classes.  The failure is caused by a difference in behaviour
> between the p2 and pde versions.

Tobias can you take a look at this test failure? It appears to be caused by your refactoring work between PDE and p2.
Comment 9 Tobias Oberlies CLA 2012-03-02 12:01:41 EST
Sorry, I've been on vacation and only just found this bug. I'm working on a fix for chmod problem for Eclipse.app (bug 352457).
Comment 10 Tobias Oberlies CLA 2012-03-02 13:08:15 EST
(In reply to comment #5)
> The specific problem is that for mac, a launcher name of "some_name" was branded
> by PDE/Build as "some_name.app/Contents/MacOS/some_name".
> 
> p2 added a special case if the name is "eclipse" (or "launcher"), then it will
> capitalize the first letter and brand as "Eclipse.app/Contents/MacOS/eclipse"
> instead of "eclipse.app/Contents/MacOS/eclipse".
Thank you for pointing this out: This was in fact a difference between the BrandingIron that we missed in the refactoring.

I've just removed the (magic) capitalization code from BrandingIron (rt.equinox.p2, commit d798afd). This should fix the test error.
Comment 11 Tobias Oberlies CLA 2012-03-07 03:54:09 EST
(In reply to comment #10)
> I've just removed the (magic) capitalization code from BrandingIron
> (rt.equinox.p2, commit d798afd). This should fix the test error.
Yep, this fixes testBug268498 [1].

[1] http://download.eclipse.org/eclipse/downloads/drops/N20120304-2000/testresults/html/org.eclipse.pde.build.tests_linux.gtk.x86_6.0.html
Comment 12 Dani Megert CLA 2012-03-15 05:01:14 EDT
There are still 2 test failures in I20120314-0800 on Java 7 but I guess they are caused by bug 361628? Can you confirm this?
Comment 13 Ian Bull CLA 2012-03-15 12:19:43 EDT
(In reply to comment #12)
> There are still 2 test failures in I20120314-0800 on Java 7 but I guess they
> are caused by bug 361628? Can you confirm this?

2 test failures? I'm actually expecting 5 (for some reason the test results are not loading for me right now).

2 failures from bug 361628, and 3 failures from bug 370299. These last 3 are test case problems, but I need to get some configuration details on the machine.  I thought someone was looking at that, but I guess not. I'll see if I can spend a few minutes with Kim today to see what's going on.
Comment 14 Ian Bull CLA 2012-03-15 14:48:34 EDT
Sorry Dani, that was my mistake. This bug is in reference to PDE/Build and not p2 (we have too many projects that start with p).  

Yes, this tests appear to be related to the problem with Jar Packer in Java 7, and like M5, will only affect users who use Java 7 (and don't have non pack.gz jars to fall back on).