Changeset View
Changeset View
Standalone View
Standalone View
lldb/test/API/commands/expression/fork/TestForkExprs.py
- This file was added.
""" | |||||
Test some more expression commands. | |||||
""" | |||||
import lldb | |||||
from lldbsuite.test.decorators import * | |||||
from lldbsuite.test.lldbtest import * | |||||
from lldbsuite.test import lldbutil | |||||
class ExprCommandsForkExpressions(TestBase): | |||||
NO_DEBUG_INFO_TESTCASE = True | |||||
def setUp(self): | |||||
# Call super's setUp(). | |||||
TestBase.setUp(self) | |||||
labath: unused code. | |||||
@skipUnlessPlatform(["linux"]) | |||||
labathUnsubmitted Not Done ReplyInline ActionsTechnically, I think this should pass on all systems that have the fork function (i.e. they are not windows), even if we don't support fork tracking there. labath: Technically, I think this should pass on all systems that have the fork function (i.e. they are… | |||||
def test_more_expr_commands(self): | |||||
"""Test some more expression commands.""" | |||||
self.build() | |||||
(target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self, | |||||
'Stop here to evaluate expressions', | |||||
lldb.SBFileSpec("main.cpp")) | |||||
self.assertTrue(bkpt.IsValid()) | |||||
bkpt.SetEnabled(False) | |||||
options = lldb.SBExpressionOptions() | |||||
options.SetIgnoreBreakpoints(True) | |||||
frame = self.thread.GetFrameAtIndex(0) | |||||
value = frame.EvaluateExpression("do_fork(argv, envp)", options) | |||||
self.assertTrue(value.IsValid()) | |||||
self.assertSuccess(value.GetError()) | |||||
value = frame.EvaluateExpression("do_vfork(argv, envp)", options) | |||||
self.assertTrue(value.IsValid()) | |||||
self.assertSuccess(value.GetError()) |
unused code.