Skip to content

Conversation

@iloveeclipse
Copy link
Member

@iloveeclipse iloveeclipse commented Oct 29, 2025

UnifiedTree.isRecursiveLink() links check may silently ignore some links

  • Main fix: the child path created from the link should use realParentPath to avoid silent NoSuchFileException's if the constructed link does not match actual (fully resolved) file system state of the local file we are checking. Original code run into (silent) exceptions and because of that was not able to detect some of possible recursive links.
  • Removed pattern checking for "../X" because backwards links can also be created with absolute paths, as seen in
    Bug_185247_recursiveLinks.test5_linkParentDirectoyTwiceWithAbsolutePath(boolean)
  • Added regression test SymlinkResourceTest.testGithubBug2220.
  • Added UnifiedTree methods to set/read disable_advanced_recursive_link_checks flag in tests so we can test
    both variants of link checking code.
  • Updated existing tests to test both advanced / simple link checks (where possible): SymlinkResourceTest, Bug_185247_recursiveLinks & Bug_185247_LinuxTests
  • Improved WorkspaceResetExtension to properly report test names (it only reported false or true for parametrized tests).

Fixes #2220

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

Test Results

 1 947 files  ± 0   1 947 suites  ±0   1h 27m 59s ⏱️ + 7m 26s
 4 734 tests +13   4 710 ✅ +14   24 💤 ± 0  0 ❌  - 1 
14 202 runs  +39  14 023 ✅ +28  179 💤 +12  0 ❌  - 1 

Results for commit dd183c5. ± Comparison against base commit f394888.

This pull request removes 11 and adds 24 tests. Note that renamed tests count towards both.
AutomatedResourceTests AllLocalStoreTests SymlinkResourceTest ‑ testBug358830
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test1_trivial
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test2_mutual
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test3_outside_tree
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test5_transitive_mutual
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test6_nonrecursive
AutomatedResourceTests AllRegressionTests Bug_185247_recursiveLinks ‑ test1_linkCurrentDirectory
AutomatedResourceTests AllRegressionTests Bug_185247_recursiveLinks ‑ test2_linkParentDirectory
AutomatedResourceTests AllRegressionTests Bug_185247_recursiveLinks ‑ test3_linkGrandparentDirectory
AutomatedResourceTests AllRegressionTests Bug_185247_recursiveLinks ‑ test4_linkParentDirectoryTwice
…
AutomatedResourceTests AllLocalStoreTests SymlinkResourceTest ‑ testBug358830(boolean)[1] false
AutomatedResourceTests AllLocalStoreTests SymlinkResourceTest ‑ testBug358830(boolean)[2] true
AutomatedResourceTests AllLocalStoreTests SymlinkResourceTest ‑ testGithubBug2220(boolean)[1] false
AutomatedResourceTests AllLocalStoreTests SymlinkResourceTest ‑ testGithubBug2220(boolean)[2] true
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test1_trivial(boolean)[1] false
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test1_trivial(boolean)[2] true
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test2_mutual(boolean)[1] false
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test2_mutual(boolean)[2] true
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test3_outside_tree(boolean)[1] false
AutomatedResourceTests AllRegressionTests Bug_185247_LinuxTests ‑ test3_outside_tree(boolean)[2] true
…

♻️ This comment has been updated with latest results.

@iloveeclipse iloveeclipse marked this pull request as ready for review November 5, 2025 13:38
@iloveeclipse iloveeclipse changed the title Check normalized and not normalized versions of parent and link UnifiedTree.isRecursiveLink() links check may silently ignore some links Nov 5, 2025
@iloveeclipse
Copy link
Member Author

iloveeclipse commented Nov 5, 2025

Two problems:

  1. JUnit 4 assumptions are ignored by JUnit 5 tests (fixed now)
  2. Releng data storage troubles, so we run into
14:15:02.676 [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:5.0.1-SNAPSHOT:validate-classpath (default-validate-classpath) on project org.eclipse.debug.terminal: Execution default-validate-classpath of goal org.eclipse.tycho:tycho-compiler-plugin:5.0.1-SNAPSHOT:validate-classpath failed: Could not mirror artifact osgi.bundle,org.eclipse.cdt.core.linux.source,6.1.100.202402230238 into the local Maven repository.See log output for details. Server returned HTTP code: 400 for URL https://download.eclipse.org/eclipse/updates/4.38-I-builds/I20251102-1800/plugins/org.eclipse.cdt.core.linux.source_6.1.100.202402230238.jar

- Main fix: the child path created from the link should use
`realParentPath` to avoid silent `NoSuchFileException`'s if the
constructed link does not match actual (fully resolved) file system
state of the local file we are checking. Original code run into (silent)
exceptions and because of that was not able to detect some of possible
recursive links.
- Removed pattern checking for "../X" because backwards links can also
be created with absolute paths, as seen in
`Bug_185247_recursiveLinks.test5_linkParentDirectoyTwiceWithAbsolutePath(boolean)`
- Added regression test `SymlinkResourceTest.testGithubBug2220`.
- Added `UnifiedTree` methods to set/read
`disable_advanced_recursive_link_checks` flag in tests so we can test
both variants of link checking code.
- Updated existing tests to test both advanced / simple link checks
(where possible): `SymlinkResourceTest`, `Bug_185247_recursiveLinks` &
`Bug_185247_LinuxTests`
- Improved `WorkspaceResetExtension` to properly report test names (it
only reported `false` or `true` for parametrized tests).

Fixes eclipse-platform#2220
@iloveeclipse iloveeclipse merged commit a20bea2 into eclipse-platform:master Nov 5, 2025
18 checks passed
@iloveeclipse iloveeclipse deleted the issue_2220 branch November 5, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UnifiedTree.isRecursiveLink() links check may skip some links

1 participant