Skip to content

Commit

Permalink
Fix 'test_pefile_checksum' test expectations
Browse files Browse the repository at this point in the history
The Gnu 'ld.bfd' linker and msvc's 'link' correctly output the PE checksum
but the llvm-based linkers like 'ld.lld' and 'lld-link' do not (yet).

This became apparent after changing the msys2 github clangx64ninja workflow
environment to explicitly use 'ld.lld' for better toolchain uniformity.
  • Loading branch information
GertyP committed Oct 9, 2023
1 parent 12841e7 commit 9005e19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unittests/windowstests.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ def test_pefile_checksum(self):
for f in (dll, exe):
pe = pefile.PE(f)
msg = f'PE file: {f!r}, compiler: {cc_id!r}, linker: {ld_id!r}'
if cc_id == 'clang-cl':
# Latest clang-cl tested (7.0) does not write checksums out
if ld_id in {'ld.lld', 'lld-link'}:
# Latest llvm-based lld linkers (as of 16.0.5) do not write checksums out
self.assertFalse(pe.verify_checksum(), msg=msg)
else:
# Verify that a valid checksum was written by all other compilers
Expand Down

0 comments on commit 9005e19

Please sign in to comment.