Skip to content

playTests: use ln -sf for the xz/lzma symlinks - #4835

Open
deadcaf3 wants to merge 1 commit into
facebook:devfrom
deadcaf3:fix-playtests-stale-symlinks
Open

deadcaf3 wants to merge 1 commit into
facebook:devfrom
deadcaf3:fix-playtests-stale-symlinks

Conversation

@deadcaf3

@deadcaf3 deadcaf3 commented Oct 9, 2026

Copy link
Copy Markdown

Fixes #4431.

tests/playTests.sh creates ./xz, ./unxz, ./lzma and ./unlzma with ln -s and only removes them at the end of the xz block. The script runs under set -e, so a run that fails or is interrupted inside that block leaves the links in tests/, and every later run aborts with:

ln: ./xz: File exists

make clean does not remove them. This change uses ln -sf, as the script already does for the zstdcat and zcat links.

Testing

  • Reproduced with make check: forced one command in the xz block to fail, reran, and got the error above.
  • With this change the same rerun passes and the links are cleaned up. A run from a clean tree also passes.
  • Run on macOS with xz support enabled. I also checked that GNU coreutils ln -sf replaces a stale or dangling link the same way.

Notes

  • The issue quotes the lz4/unlz4 links in tests/Makefile. Those are guarded by [ -f lz4 ] || and did not fail when I tested them with stale links, so I left them unchanged. Happy to add -f there too if preferred.
  • The issue has no log, so I can't tell what made the reporter's first run fail. This only stops the leftover links from breaking later runs.

The xz block creates ./xz, ./unxz, ./lzma and ./unlzma with `ln -s` and
only removes them once the block has passed. The script runs under
`set -e`, so a run that fails or is interrupted inside the block leaves
the links in tests/, and every later run then aborts with
"ln: ./xz: File exists". `make clean` does not remove them.

Use `ln -sf`, as the script already does for the zstdcat and zcat links.

fix facebook#4431
@meta-cla meta-cla Bot added the CLA Signed label Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Makefile in the tests directory; ln command needs the "f" switch

1 participant