Skip to content

testsuite: fix timestamp race in exclude test - #1120

Open
iamanaws wants to merge 1 commit into
RsyncProject:masterfrom
iamanaws:bugfix/exclude-test-timestamps
Open

iamanaws wants to merge 1 commit into
RsyncProject:masterfrom
iamanaws:bugfix/exclude-test-timestamps

Conversation

@iamanaws

@iamanaws iamanaws commented Oct 7, 2026

Copy link
Copy Markdown

The same-newness files are created with separate touch() calls. If those calls cross a second boundary, the destination becomes newer and --update skips it, causing the test to fail.

Copy the source timestamps to the destination explicitly so the equal-age case is deterministic.

Validated on Linux with rsync 3.5.0: a reproducer forcing each touch across a second boundary fails before the fix and passes afterward. The genuinely newer source and destination cases still pass. The full suite was not run.

AI assistance was used to prepare and validate this fix.

The same-newness files must have equal modification times, but
separate touch calls can straddle a second boundary and make the
destination newer. This causes --update to skip it unexpectedly.

Copy the source timestamps to the destination explicitly.
@iamanaws
iamanaws force-pushed the bugfix/exclude-test-timestamps branch from 09df93e to af7e8a5 Compare October 7, 2026 22:12
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.

1 participant