[Lldb-commits] [PATCH] Add test for denied process attach by pid and fix found bugs in Process/ProcessPOSIX.cpp
Oleksiy Vyalov
ovyalov at google.com
Wed Nov 12 16:05:06 PST 2014
Hi clayborg,
New test test/functionalities/process_attach/attach_denied covers the case when attach is denied by potential inferior.
This test uncovered next issues that I fixed along as well:
- lldbtest calls SBProcess::Kill for every inferior within test's tearDown. If attach fails ProcessPOSIX::DoDestroy calls m_monitor->Kill() which sends SIGKILL to pid 0, i.e. killing all processes in the current process group. Added check for invalid pid in ProcessPOSIX::DoDestroy
- Modified ProcessPOSIX::DoDestroy made test to fail since Kill returns an error. Changed Target/Process.cpp in order to transition process to exited state in case of attach failure - so, DoDestroy exits properly since HasExited() returns true.
http://reviews.llvm.org/D6240
Files:
source/Plugins/Process/POSIX/ProcessPOSIX.cpp
source/Target/Process.cpp
test/functionalities/process_attach/attach_denied/Makefile
test/functionalities/process_attach/attach_denied/TestAttachDenied.py
test/functionalities/process_attach/attach_denied/main.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6240.16124.patch
Type: text/x-patch
Size: 3976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141113/781feecb/attachment.bin>
More information about the lldb-commits
mailing list