Bug 572138 - CoreTest tries to run createSymLinkTest with cmd on Linux
Summary: CoreTest tries to run createSymLinkTest with cmd on Linux
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.20   Edit
Hardware: All Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Alex Blewitt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-20 17:41 EDT by Alex Blewitt CLA
Modified: 2021-03-22 04:56 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Blewitt CLA 2021-03-20 17:41:25 EDT
Might be a reversion of bug 446698 but it looks like it's still occurring:

OS name: "linux", version: "5.9.16-200.fc33.x86_64", arch: "amd64", family: "unix"

Running org.eclipse.core.tests.resources.AutomatedTests
java.io.IOException: Cannot run program "cmd" (in directory "/tmp"): error=2, No such file or directory
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at java.base/java.lang.Runtime.exec(Runtime.java:591)
	at org.eclipse.core.tests.harness.CoreTest.createSymLink(CoreTest.java:245)
	at org.eclipse.core.tests.harness.CoreTest.canCreateSymLinks(CoreTest.java:270)
	at org.eclipse.core.tests.filesystem.SymlinkTest.testBrokenSymlinkMove(SymlinkTest.java:158)

This was running a test against the eclipse.platform.resources builds, specifically https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178143 but the test is unrelated to this.

https://github.com/eclipse/eclipse.platform.runtime/blob/43e3d1caf24608ee6ea0b6f3553c9b0b03971863/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/CoreTest.java#L239-L246

The 'canCreateSymlink' call should only try and exec if it's on Windows, else just assume you can.
Comment 1 Alex Blewitt CLA 2021-03-20 17:44:43 EDT
This was caused by the removal of 'ifIsWindows' check by Lars:

https://git.eclipse.org/r/c/platform/eclipse.platform.runtime/+/155288
Comment 2 Eclipse Genie CLA 2021-03-20 17:52:50 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.runtime/+/178148