From 9005e19ccdacbc464811862eddc3caa1a84d8dc8 Mon Sep 17 00:00:00 2001 From: Dan Hawson <18214721+GertyP@users.noreply.github.com> Date: Wed, 9 Aug 2023 21:00:06 +0100 Subject: [PATCH] Fix 'test_pefile_checksum' test expectations 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. --- unittests/windowstests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unittests/windowstests.py b/unittests/windowstests.py index c6043da58300..576179e28f9f 100644 --- a/unittests/windowstests.py +++ b/unittests/windowstests.py @@ -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