From 90af0b1260f170bd4800c6c4e75beae3271bb029 Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Mon, 6 Jan 2025 09:28:17 -0800 Subject: [PATCH] cc_maintainers: convert all addresses to lower case Heiner reports false positives when CC list and MAINTAINERS differ on case. Signed-off-by: Jakub Kicinski --- form-letters/net-next-closed | 1 + tests/patch/cc_maintainers/test.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/form-letters/net-next-closed b/form-letters/net-next-closed index 187ad5b..f46841e 100644 --- a/form-letters/net-next-closed +++ b/form-letters/net-next-closed @@ -9,3 +9,4 @@ RFC patches sent for review only are obviously welcome at any time. See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle -- pw-bot: defer +pv-bot: closed diff --git a/tests/patch/cc_maintainers/test.py b/tests/patch/cc_maintainers/test.py index 1c9dbb7..8d7dd8f 100644 --- a/tests/patch/cc_maintainers/test.py +++ b/tests/patch/cc_maintainers/test.py @@ -148,7 +148,7 @@ def cc_maintainers(tree, thing, result_dir) -> Tuple[int, str, str]: addrs += msg.get_all('cc', []) addrs += msg.get_all('from', []) addrs += msg.get_all('sender', []) - included = set([e for n, e in email.utils.getaddresses(addrs)]) + included = set([e.lower() for n, e in email.utils.getaddresses(addrs)]) out += ["=== Email ===", f"From: {msg.get_all('from')}", f"Included: {included}", ""] @@ -174,7 +174,7 @@ def cc_maintainers(tree, thing, result_dir) -> Tuple[int, str, str]: raw_gm.append(line.strip()) match = emailpat.search(line) if match: - addr = match.group(1) + addr = match.group(1).lower() expected.add(addr) if 'blamed_fixes' in line: blamed.add(addr) @@ -226,7 +226,7 @@ def cc_maintainers(tree, thing, result_dir) -> Tuple[int, str, str]: continue for have in included: if have in mmap_emails: - mapped.add(m) + mapped.add(m.lower()) found.update(mapped) missing.difference_update(mapped)