increase portability of testsuite#907
Merged
Merged
Conversation
…, /bin, / The Python rewrite of the suite carried over the shell habit of populating the test tree by capturing "ls -l /etc" / "ls -l /bin" (falling back to "ls /"): hands_setup() built etc-ltr-list / bin-lt-list that way, and longdir_test.py did the same for its leaf files. That ties the fixtures to the host filesystem layout -- those directories are absent or unreadable on Android/Termux and other minimal environments, where "ls /" fails outright -- and the captured content was never reproducible from run to run. Add a deterministic make_text_file() helper to rsyncfns.py and use it for hands_setup()'s two fixture files and longdir's leaf files. The names etc-ltr-list / bin-lt-list are unchanged (chmod, chmod-temp-dir and alt-dest reference them by name); only the content source changes, so the fixtures are now self-contained and identical on every platform. This also drops longdir_test.py's date(1) and ls(1) subprocess calls. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
xattr_set() sets attributes with the native os.setxattr(), but xattr_dump() read them back by running "getfattr -d". That asymmetry breaks "make check" on any system where rsync is built with xattr support (libattr headers present) but the attr package's CLI tools are not installed -- common on Android/Termux and minimal CI images: setting succeeds via os.setxattr, then xattr_dump's getfattr raises FileNotFoundError, which crashes the test (reported FAIL) instead of running or skipping it. That's why "make check" was failing here on xattrs / xattrs-hlink. Read the xattrs natively with os.listxattr()/os.getxattr() on Linux, symmetric with xattr_set(), so the suite needs no external getfattr; the output still mimics "getfattr -d" and only has to be self-consistent between the source and destination dumps. Cygwin keeps the CLI path (Python there lacks os.*xattr). make check now passes with no attr package installed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
this fixes some issues with the test suite on android under termux