Author: Alex Langford Date: 2026-02-24T11:50:25-08:00 New Revision: a41cedaa73136531e410f238a77b315c2c2c43ab
URL: https://github.com/llvm/llvm-project/commit/a41cedaa73136531e410f238a77b315c2c2c43ab DIFF: https://github.com/llvm/llvm-project/commit/a41cedaa73136531e410f238a77b315c2c2c43ab.diff LOG: [lldb] Make TestProcessAttach.py more reliable (#183141) This test occasionally fails on GreenDragon. When the directory already exists and we enter the exception block, the `os.errno` symbol is not found because it was deprecated in Python 3.7. Instead, replace `os.mkdir` with `os.makedirs` because it can handle a directory already existing. Added: Modified: lldb/test/API/commands/process/attach/TestProcessAttach.py Removed: ################################################################################ diff --git a/lldb/test/API/commands/process/attach/TestProcessAttach.py b/lldb/test/API/commands/process/attach/TestProcessAttach.py index 0e916d2e8e4cb..8a61e74007f85 100644 --- a/lldb/test/API/commands/process/attach/TestProcessAttach.py +++ b/lldb/test/API/commands/process/attach/TestProcessAttach.py @@ -59,11 +59,7 @@ def test_attach_to_process_by_id_autocontinue(self): def test_attach_to_process_from_ diff erent_dir_by_id(self): """Test attach by process id""" newdir = self.getBuildArtifact("newdir") - try: - os.mkdir(newdir) - except OSError as e: - if e.errno != os.errno.EEXIST: - raise + os.makedirs(newdir, exist_ok=True) testdir = self.getBuildDir() exe = os.path.join(newdir, "proc_attach") self.buildProgram("main.cpp", exe) _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
