eclipse-platform / eclipse.platform

https://eclipse.dev/eclipse/
Eclipse Public License 2.0
84 stars 113 forks source link

LaunchTests.testProcessLaunchWithLongWorkingDirectory fails on Linux since I20240730-1800 #1488

Closed iloveeclipse closed 3 months ago

iloveeclipse commented 3 months ago

See https://download.eclipse.org/eclipse/downloads/drops4/I20240730-1800/testresults/html/org.eclipse.debug.tests_ep433I-unit-cen64-gtk3-java17_linux.gtk.x86_64_17.html

Most likely regression from https://github.com/eclipse-platform/eclipse.platform/pull/1477

Exception occurred executing command line.

org.eclipse.core.runtime.CoreException: Exception occurred executing command line.
at org.eclipse.debug.core.DebugPlugin.exec(DebugPlugin.java:1015)
at org.eclipse.debug.tests.launching.LaunchTests.startProcessAndAssertOutputContains(LaunchTests.java:155)
at org.eclipse.debug.tests.launching.LaunchTests.testProcessLaunchWithLongWorkingDirectory(LaunchTests.java:150)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
Caused by: java.io.IOException: Cannot run program "java" (in directory "/home/jenkins/agent/workspace/AutomatedTests/ep433I-unit-cen64-gtk3-java17/tmp/junit9299054611657995980/subfolder-with-relativly-long-name/subfolder-with-relativly-long-name/subfolder-with-relativly-long-name/subfolder-with-relativly-long-name/subfolder-with-relativly-long-name/subfolder-with-relativly-long-name/subfolder-with-relativly-long-name/subfolder-with-relativly-long-name"): error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at java.base/java.lang.Runtime.exec(Runtime.java:594)
at org.eclipse.debug.core.DebugPlugin.exec(DebugPlugin.java:1011)
... 3 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 6 more
iloveeclipse commented 3 months ago

@HannesWell : could you please check?

HannesWell commented 3 months ago

@HannesWell : could you please check?

I can do it, probably this evening. But I wonder why it fails only in I-builds? Maybe it is sufficient to ensure the working-dir really exists, although I expected the JUnit TempFolder to create it.

akurtakov commented 3 months ago

Is there any progress on this one?

HannesWell commented 3 months ago

Sorry I forgot about this. Just created https://github.com/eclipse-platform/eclipse.platform/pull/1511 as an attempt to fix this.

However I wonder how this can fail in I-builds when it passes in verification builds? Do you have any idea? Can one of the Linux users reproduce it locally? Can Linux also have some kind of path length limit?

iloveeclipse commented 3 months ago

I've tried to make it failing locally but failed. I was using RHEL9.2

HannesWell commented 3 months ago

Thanks for trying. Then lets have #1511 and if that doesn't help, I'll disable that test for Linux. It's actually only relevant for Windows any ways.

HannesWell commented 3 months ago

Lets keep this open until the fix has been verified.

HannesWell commented 3 months ago

Verified that for the latest I-build this issue is fixed.