Author: friss Date: Fri Jul 13 10:45:43 2018 New Revision: 337029 URL: http://llvm.org/viewvc/llvm-project?rev=337029&view=rev Log: 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. Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile?rev=337029&r1=337028&r2=337029&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile Fri Jul 13 10:45:43 2018 @@ -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 Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist?rev=337029&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist Fri Jul 13 10:45:43 2018 @@ -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> _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits