summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2018-07-13 17:45:43 +0000
committerFrederic Riss <friss@apple.com>2018-07-13 17:45:43 +0000
commit8e04d937b0656242162cebe96c8c306e0ab62959 (patch)
tree5dd5e89fd21abe1b3c61833ad135c863729754d0 /lldb/packages/Python/lldbsuite/test
parent75c4f5552ea38368b770dea4da3437350c99e9c1 (diff)
downloadbcm5719-llvm-8e04d937b0656242162cebe96c8c306e0ab62959.tar.gz
bcm5719-llvm-8e04d937b0656242162cebe96c8c306e0ab62959.zip
Fix TestAttachDenied on macOS Mojave
TestAttachDenied tries to attach to a process that is ptracing itself and verifies that we error out. Starting with macOS Mojave, processes need an entitlement to be able to ptrace. This commit adds the entitlement for the test binary when building on Darwin. llvm-svn: 337029
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist8
2 files changed, 15 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile
index 87600bbccf9..3c1f73515eb 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile
@@ -4,4 +4,11 @@ CXX_SOURCES := main.cpp
EXE := AttachDenied
+all: AttachDenied sign
+
include $(LEVEL)/Makefile.rules
+
+sign: entitlements.plist AttachDenied
+ifeq ($(OS),Darwin)
+ codesign -s - -f --entitlements $^
+endif
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist
new file mode 100644
index 00000000000..3d60e8bd0b9
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.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.cs.debugger</key>
+ <true/>
+</dict>
+</plist>
OpenPOWER on IntegriCloud