xattr: document fakeroot xattr as Linux-only, add missing fakeroot skip on FreeBSD, fixes #9394#9396
Merged
ThomasWaldmann merged 1 commit intoborgbackup:masterfrom Feb 22, 2026
Conversation
…ip on FreeBSD, fixes borgbackup#9394
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9396 +/- ##
=======================================
Coverage 76.43% 76.43%
=======================================
Files 85 85
Lines 14802 14800 -2
Branches 2212 2212
=======================================
- Hits 11314 11313 -1
Misses 2809 2809
+ Partials 679 678 -1 ☔ View full report in Codecov by Sentry. |
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/borg/xattr.py(lines 22-23) that asked whether fakeroot supports xattrs on non-Linux platformsskipif_fakeroot_detectedtofreebsd_test.pyfor consistency withlinux_test.pyanddarwin_test.pyXATTR_FAKEROOTisFalseon non-Linux and without fakeroot activeFixes #9394
Background
Investigation confirmed fakeroot xattr support is Linux-only:
setxattr/getxattrAPI, but these platforms use theextattr_*API instead — fakeroot never intercepts xattr calls there#undefs all xattr wrappers due to prototype incompatibilities with the Linux versions"fakeroot causes lots of troubles", NetBSD/OpenBSD have"no fakeroot"Changes
src/borg/xattr.py— Replace TODO comments with documentation explaining why detection is Linux-onlysrc/borg/testsuite/platform/freebsd_test.py— Addskipif_fakeroot_detectedtopytestmark(was missing, unlikelinux_test.pyanddarwin_test.py)src/borg/testsuite/xattr_test.py— Addtest_xattr_fakeroot_flag()testTest plan
test_xattr_fakeroot_flagruns and passes