Skip to content

Conversation

@benlangmuir
Copy link

  • Explanation: Fixes the CAS tests on FreeBSD by fixing a spurious error when using compilation caching (also possible on Linux but not observed) when the particular filesystem does not support posix_fallocate. Also fixes the diagnostic output when a "real" error is reported from posix_fallocate.
  • Scope: Affects systems that have posix_fallocate (Linux and FreeBSD) if compilation caching is enabled and any error is encountered in posix_fallocate.
  • Issues: CAS tests failing on FreeBSD #11053
  • Original PRs: [llvm][cas] Fix error handling of posix_fallocate #11049
  • Reviewers: @etcwilde
  • Risk: Low: only impacts caching builds on FreeBSD and Linux that encounter an error during allocation of the CAS files.
  • Testing: Fixes CAS tests on FreeBSD.

The posix_fallocate function returns an error code directly and not via errno, and on older POSIX versions it may return EINVAL in places it should return ENOTSUP (in practice, seen on FreeBSD).

(cherry picked from commit c8f75c6)

The posix_fallocate function returns an error code directly and not via
errno, and on older POSIX versions it may return EINVAL in places it
should return ENOTSUP (in practice, seen on FreeBSD).

(cherry picked from commit c8f75c6)
@benlangmuir benlangmuir requested a review from a team as a code owner July 23, 2025 16:40
@benlangmuir
Copy link
Author

@swift-ci please test

@fredriss fredriss merged commit 367909f into swiftlang:swift/release/6.2 Jul 24, 2025
3 checks passed
@benlangmuir benlangmuir deleted the fix-posix_fallocate-error-handling-6.2 branch July 24, 2025 16:51
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.

2 participants