This is an archive of the discontinued LLVM Phabricator instance.

Update TestGdbRemoteAbort and TestGdbRemoteSegFault to use `get_signal_number`.
ClosedPublic

Authored by chaoren on Jun 5 2015, 3:19 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

chaoren updated this revision to Diff 27237.Jun 5 2015, 3:19 PM
chaoren retitled this revision from to Update many parts of test suite to use `lldbutil.get_signal_number`..
chaoren updated this object.
chaoren edited the test plan for this revision. (Show Details)
chaoren added reviewers: ovyalov, clayborg.
chaoren added a subscriber: Unknown Object (MLST).
ovyalov added inline comments.Jun 5 2015, 4:54 PM
test/functionalities/process_group/TestChangeProcessGroup.py
75 ↗(On Diff #27237)

Since it checks for local /proc directory it's ok to send local SIGKILL.

To make it work on any platform we may use sth like

self.dbg.GetSelectedPlatform().Kill(int(pid))

instead of

if lldb.remote_platform:
               lldb.remote_platform.Kill(int(pid))
           else:
               if os.path.exists("/proc/" + pid):
                   os.kill(int(pid), lldbutil.get_signal_number('SIGKILL'))
test/lldbtest.py
297 ↗(On Diff #27237)

_LocalProcess handles only local processes - signal.SIGHUP should be ok.

1334 ↗(On Diff #27237)

Fork should be only local.

chaoren updated this revision to Diff 27242.Jun 5 2015, 4:59 PM
  • Only use get_signal_number where it's possible to be a remote signal.
ovyalov accepted this revision.Jun 5 2015, 5:17 PM
ovyalov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 5 2015, 5:17 PM
chaoren retitled this revision from Update many parts of test suite to use `lldbutil.get_signal_number`. to Update TestGdbRemoteAbort and TestGdbRemoteSegFault to use `lldbutil.get_signal_number`..Jun 5 2015, 5:20 PM
chaoren edited edge metadata.
chaoren retitled this revision from Update TestGdbRemoteAbort and TestGdbRemoteSegFault to use `lldbutil.get_signal_number`. to Update TestGdbRemoteAbort and TestGdbRemoteSegFault to use `get_signal_number`..
This revision was automatically updated to reflect the committed changes.