Skip to content

Compare the zero-name torrents without their creation date - #3531

Merged
xirvik merged 1 commit into
Novik:masterfrom
xirvik:test-torrent-zero-name-date
Nov 8, 2026
Merged

xirvik merged 1 commit into
Novik:masterfrom
xirvik:test-torrent-zero-name-date

Conversation

@xirvik

@xirvik xirvik commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

TorrentZeroNameTest builds each torrent twice, from the relative and from the absolute path, and compared the
two results byte for byte. Torrent stamps every torrent it builds with time() in creation date, so the test
failed whenever the two builds fell in different seconds, as in run 42504155982 on PHP 7.4. The bytes are now
compared with that one key removed. Everything else in the metainfo, the info dictionary included, still has to
match.

With a one-second sleep between the two builds, master fails 8 checks and this change passes all 337. The full
suite passes on 7.4, 8.1, 8.5 and 32-bit.

Torrent stamps every torrent it builds with time() in creation date.
TorrentZeroNameTest builds each one twice, from the relative and the
absolute path, and compared the bytes, so it failed whenever the two
builds fell in different seconds (php 7.4, run 42504155982). The bytes
are now compared without that one key.
@xirvik
xirvik merged commit bcd3f30 into Novik:master Nov 8, 2026
12 checks passed
@xirvik
xirvik deleted the test-torrent-zero-name-date branch November 8, 2026 18:24
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