[Lldb-commits] [lldb] 17798ad - [lldb] Use get-task-allow entitlement on macOS too (#71112)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 3 09:26:51 PDT 2023
Author: Daniel Thornburgh
Date: 2023-11-03T09:26:47-07:00
New Revision: 17798ad7c3596d9b74b5f55ac41f10fe01e8ee4b
URL: https://github.com/llvm/llvm-project/commit/17798ad7c3596d9b74b5f55ac41f10fe01e8ee4b
DIFF: https://github.com/llvm/llvm-project/commit/17798ad7c3596d9b74b5f55ac41f10fe01e8ee4b.diff
LOG: [lldb] Use get-task-allow entitlement on macOS too (#71112)
Running the LLDB test suite in a GUI-less macOS environment (say, ssh)
requires that the debugged tasks be signed with the get-task-allow
entitlement.
Added:
lldb/packages/Python/lldbsuite/test/make/entitlements-macos.plist
Modified:
lldb/packages/Python/lldbsuite/test/builders/darwin.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/builders/darwin.py b/lldb/packages/Python/lldbsuite/test/builders/darwin.py
index 40dd13bcfdea1d6..a023bda3ad80103 100644
--- a/lldb/packages/Python/lldbsuite/test/builders/darwin.py
+++ b/lldb/packages/Python/lldbsuite/test/builders/darwin.py
@@ -88,17 +88,18 @@ def getExtraMakeArgs(self):
args["FRAMEWORK_INCLUDES"] = "-F{}".format(private_frameworks)
operating_system, env = get_os_and_env()
- if operating_system and operating_system != "macosx":
- builder_dir = os.path.dirname(os.path.abspath(__file__))
- test_dir = os.path.dirname(builder_dir)
+
+ builder_dir = os.path.dirname(os.path.abspath(__file__))
+ test_dir = os.path.dirname(builder_dir)
+ if not operating_system:
+ entitlements_file = "entitlements-macos.plist"
+ else:
if env == "simulator":
entitlements_file = "entitlements-simulator.plist"
else:
entitlements_file = "entitlements.plist"
- entitlements = os.path.join(test_dir, "make", entitlements_file)
- args["CODESIGN"] = "codesign --entitlements {}".format(entitlements)
- else:
- args["CODESIGN"] = "codesign"
+ entitlements = os.path.join(test_dir, "make", entitlements_file)
+ args["CODESIGN"] = "codesign --entitlements {}".format(entitlements)
# Return extra args as a formatted string.
return ["{}={}".format(key, value) for key, value in args.items()]
diff --git a/lldb/packages/Python/lldbsuite/test/make/entitlements-macos.plist b/lldb/packages/Python/lldbsuite/test/make/entitlements-macos.plist
new file mode 100644
index 000000000000000..9acd12816c91373
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/make/entitlements-macos.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>com.apple.security.get-task-allow</key>
+ <true/>
+</dict>
+</plist>
More information about the lldb-commits
mailing list