[Lldb-commits] [lldb] [lldb][test] Check cryptography.x509 in the strict test requirements (PR #229409)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 6 05:49:10 PDT 2026


https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/229409

`lldb_find_python_module(cryptography)` only runs `import cryptography`, which does not load the native `cryptography.hazmat.bindings._rust`. An install without cffi (`pip install --no-deps cryptography`) passed the check, then every `from cryptography import x509` in `TestSymStore.py` failed with "ModuleNotFoundError: No module named '_cffi_backend'".

This patch imports `cryptography.x509` instead so such an install fails at configure time.


>From 230b4309ff8a80b24f94b0dccce08456fb91505a Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Tue, 6 Oct 2026 13:47:17 +0100
Subject: [PATCH] [lldb][test] Check cryptography.x509 in the strict test
 requirements

---
 lldb/test/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index 59e3c3179337246..288723d0099a416 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -12,7 +12,7 @@ endif()
 if(LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS)
   message(STATUS "Enforcing strict test requirements for LLDB")
   # Lit uses psutil to do per-test timeouts.
-  set(useful_python_modules psutil packaging cryptography)
+  set(useful_python_modules psutil packaging cryptography.x509)
 
   if(NOT WIN32)
     # We no longer vendor pexpect and it is not used on Windows.



More information about the lldb-commits mailing list