forked from OSchip/llvm-project
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
This commit is contained in:
parent
75c4f5552e
commit
8e04d937b0
|
@ -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
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue