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

Bug 576208

Summary: [Mac] 30 p2 tests fail since I20210921-1800
Product: [Eclipse Project] Equinox Reporter: Andrey Loskutov <loskutov>
Component: p2Assignee: Sravan Kumar Lakkimsetti <sravankumarl>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: akurtakov, laeubi, sravankumarl
Version: 4.22   
Target Milestone: 4.22 M1   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Andrey Loskutov CLA 2021-09-23 02:24:26 EDT
We have major regression on Mac since I20210921-1800

https://download.eclipse.org/eclipse/downloads/drops4/I20210921-1800/testresults/html/org.eclipse.equinox.p2.tests_ep422I-unit-mac64-java11_macosx.cocoa.x86_64_11.html

Around ~30 tests are failing now, mostly in p2.tests.reconciler.dropins & p2.tests.sharedinstall area.
Comment 1 Alexander Kurtakov CLA 2021-09-23 02:29:21 EDT
AFAIU from Sravan these tests are running on Mac arm 64 machine using x86_64->arm64 translator(called rosetta2) and one possibility is that org.eclipse.equinox.p2.tests.reconciler.product is not built (or at least not with x86_64 support) when using the translator.
Comment 2 Alexander Kurtakov CLA 2021-09-23 02:35:24 EDT
This is recent change in agent which used to be macos x86_64 so aarch64 can be tested too. Aka this is not regression in p2 but rather missing detection or tests setup .
Comment 3 Christoph Laeubrich CLA 2021-09-23 04:47:43 EDT
Maybe mac/arm64 is the future but should we really "fix" tests failing on the wrong architecture, how do we make sure they won't fail then on a real mac/x86_64?
Comment 4 Sravan Kumar Lakkimsetti CLA 2021-09-23 06:04:08 EDT
From Java 17 onwards Java has support for arm64. With Apple moving to towards arm architecture, we do need to move our testing to arm64.

Now x86_64 applications can run on a mac arm64 machine and reverse is not possible.

We have two options. 
1. Have 2 machines for x86_64 and arm64
2. Run both configurations on arm64 machine

To run UI tests we need a dedicated agent attached to Jipp. Right now we are using a dedicated agent assigned by IBM for these tests. 

If any strategic foundation member assigns a dedicated agent from their quota, we can keep both machines. (IBM exhausted its quota)

We are left with the second option now. In this case we have to run x86_64 config on arm64 machine. This is where we are seeing this issue.
Comment 5 Christoph Laeubrich CLA 2021-09-23 06:13:27 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #4)
> Now x86_64 applications can run on a mac arm64 machine and reverse is not
> possible.

they can run but obviously show different behavior isn't it?

> (IBM exhausted its quota)

Strange enough that IBM is running out of machines, last time I checked they even tried to sell them :-P

Given that I always hear complains that we are low on contributor time (especially at P2) and thus feature can't happen and bugs are not fixed it really sound weird to waste these "human resources" to save a single(!) build agent...
Comment 6 Sravan Kumar Lakkimsetti CLA 2021-09-23 06:27:08 EDT
(In reply to Christoph Laeubrich from comment #5)
> (In reply to Sravan Kumar Lakkimsetti from comment #4)

> Given that I always hear complains that we are low on contributor time
> (especially at P2) and thus feature can't happen and bugs are not fixed it
> really sound weird to waste these "human resources" to save a single(!)
> build agent...

Since these tests are passing on arm64 config we can always drop x84_64 run.

If we want to have arm and intel architecture running natively, we need to find 1 dedicated agent.
Comment 7 Sravan Kumar Lakkimsetti CLA 2021-09-29 09:39:20 EDT
There is some promising development in this regard. running equinox p2 tests succeeded. I am running full test suite now. 

If this succeeds I will make necessary changes.
Comment 8 Sravan Kumar Lakkimsetti CLA 2021-09-30 11:26:04 EDT
When I investigated the 30 test failures in p2 I noticed the paths being accessed are random paths(a security feature in recent Mac systems when the running program, in the case java 11, is not signed with hardened runtime).

Hardened runtime requirement came after java 11 has been released so it is possible that java 11 is not signed with hardened runtime. 

Tried using java 17 and all these test failures are gone. Now I moved to java 17 in mac platforms