Skip to content

fix tarfs absolute symlink test for Windows - #9654

Merged
taylorsilva merged 1 commit into
concourse:masterfrom
Pix4D:pci-4898-tarfs-test-fix-absolute-path-symlink-test-upstream
Jul 27, 2026
Merged

taylorsilva merged 1 commit into
concourse:masterfrom
Pix4D:pci-4898-tarfs-test-fix-absolute-path-symlink-test-upstream

Conversation

@aliculPix4D

@aliculPix4D aliculPix4D commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Why was 146ab33 the wrong fix?

Code path for absolute path /absolute/path/file on Linux:

linux

Code path for path /absolute/path/file on Windows:

623207706-326c2525-12c6-4b7b-8ddc-f7272118954a

We must ensure we are testing the same code path on each platform. Hence, we must test an absolute path (/absolute/path/file) on Unix and an absolute path on Windows (C:\foo).

The fact that the test was green at the end (after filepath.FromSlash(header.Linkname) manipulation ) is just due to the fact that at the end, by chance, in both cases, we end up calling the same L134 in production code:

err = root.Symlink(filepath.FromSlash(header.Linkname), filePath)

- expand the absolute-path symlink ExtractEntry case into a platform-aware table so Unix paths are skipped on Windows and a Windows absolute link (`C:\foo`) is covered there.
@aliculPix4D

Copy link
Copy Markdown
Contributor Author

@odormond @marco-m-pix4d FYI

@aliculPix4D
aliculPix4D deleted the pci-4898-tarfs-test-fix-absolute-path-symlink-test-upstream branch July 24, 2026 08:07
@aliculPix4D
aliculPix4D restored the pci-4898-tarfs-test-fix-absolute-path-symlink-test-upstream branch July 24, 2026 08:08
@aliculPix4D aliculPix4D reopened this Jul 24, 2026
@taylorsilva
taylorsilva merged commit 4eecdfa into concourse:master Jul 27, 2026
12 checks passed
@aliculPix4D
aliculPix4D deleted the pci-4898-tarfs-test-fix-absolute-path-symlink-test-upstream branch July 28, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants