Repository navigation
1.4: fix {NL} double CR on Windows, fix tests failing on MSYS2 / Cygwin - #10638
Merged
ThomasWaldmann merged 1 commit intoNov 17, 2026
Merged
Conversation
ThomasWaldmann
force-pushed
the
fix-msys2-new-tests-1.4
branch
from
November 16, 2026 21:07
ac6f45a to
0b17a40
Compare
ThomasWaldmann
force-pushed
the
fix-msys2-new-tests-1.4
branch
2 times, most recently
from
November 16, 2026 21:34
e1b1688 to
fb058b2
Compare
ThomasWaldmann
force-pushed
the
fix-msys2-new-tests-1.4
branch
from
November 16, 2026 21:44
fb058b2 to
16f0406
Compare
Use \n for the {NL} / {NEWLINE} format specifiers: \n is automatically
converted on write to the platform-dependent os.linesep. Using
os.linesep instead of \n meant that on Windows, the line ending
became "\r\r\n" (borg list --format and the default borg list
formats). Also switch mentions of {LF} to {NL} in the tests.
Backport of 66a407f from master.
Tests:
- info --quick-stats: look for the "Archive name" line via
splitlines(), the output has "\r\n" line ends on Windows.
- test_list_repository_format: compare with os.linesep line ends
(exactly, so "\r\r\n" from {NL} gets caught), resp. look for the
lines via splitlines().
- test_repository_previously_remote: skip on Windows, borg 1.4 does
not support remote repository locations there.
- delete_segment_dir: delete the segment files via the repository, so
it first closes the fds it has open for them. Windows can not remove
a file that is still open.
- test_create_read_special_symlink: skip on Cygwin like master does,
it hangs there: Cygwin's stat() does not follow a symlink to a FIFO,
so borg archives the symlink and the test's FIFO writer never gets
a reader.
- test_atime_open_updates_atime: do not create a hard link (like
test_atime), on Cygwin, creating a hard link to an executable file
updates its atime, so extract changed the atime of input/file1.
Co-authored-by: Rayyan Ansari <rayyan@ansari.sh>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThomasWaldmann
force-pushed
the
fix-msys2-new-tests-1.4
branch
from
November 17, 2026 03:51
16f0406 to
0a3e013
Compare
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.
Running the test suite of borg 1.4.6rc1 (from PyPI) on Windows 11 with MSYS2 UCRT64 (Python 3.14) showed some failures that are not in 1.4.5 or that are easy to fix:
{NL}/{NEWLINE}gave"\r\r\n"line ends on Windows - backport of 66a407f from master (by Rayyan Ansari):{NL}wasos.linesep, butborg listwrites the formatted output to thesys.stdouttext stream, which translates"\n"toos.linesepon Windows once more. This affected custom--formatstrings and also the defaultborg listformats (they end with{NL}). Now{NL}is"\n", as on master.Tests:
info --quick-stats: look for theArchive nameline viasplitlines(), the output has"\r\n"line ends on Windows.test_list_repository_format: compare withos.linesepline ends (exactly, so"\r\r\n"from{NL}gets caught), resp. look for the lines viasplitlines().test_repository_previously_remote: skip on Windows, borg 1.4 does not support remote repository locations there.delete_segment_dir: delete the segment files via the repository, so it first closes the fds it has open for them. Windows can not remove a file that is still open (WinError 32).test_create_read_special_symlink: skip on Cygwin like master does, it hangs there (also with 1.4.5): Cygwin'sstat()does not follow a symlink to a FIFO (stat -L/test -pneither), so borg archives the symlink and the test's FIFO writer never gets a reader.test_atime_open_updates_atime(new in 1.4.6): do not create a hard link, liketest_atime. On Cygwin, creating a hard link to an executable file updates its atime, so extract changed the atime ofinput/file1(mode 4755).Fixed on MSYS2:
test_create_ctrl_c_writes_checkpoint,test_create_paths_from_stdin_ctrl_c,test_extract_duplicate_hardlink_item,test_info_quick_stats,test_list_repository_format,test_repository_previously_remote(in-process and binary variants, where they run) andRepositoryCheckTestCase.test_repair_missing_segment_dir.Not addressed here, because 1.4.5 has the same failures on MSYS2:
__testsuite__:C:/...test location is invalid on Windows.*_from_commandtests:create --paths-from-command/--content-from-commandpasspreexec_fntoPopen, which is not supported on Windows.Tested:
test_create_read_special_symlinkis skipped instead of hanging,test_atime_open_updates_atimepasses. The remaining Cygwin failures are the same with 1.4.5 (--stdin-userdefaultuid2user(0)isNoneon Cygwin,test_umask,test_get_item_uid_gid).🤖 Generated with Claude Code