[Lldb-commits] [lldb] r360480 - Ted pointed out that some of test tests that are enabling packet
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Fri May 10 16:03:06 PDT 2019
Author: jmolenda
Date: Fri May 10 16:03:05 2019
New Revision: 360480
URL: http://llvm.org/viewvc/llvm-project?rev=360480&view=rev
Log:
Ted pointed out that some of test tests that are enabling packet
logging when the testsuite is run with trace mode enabled are leaving
the logging enabled after the tests have finished. That state
isn't cleared in a --no-multiprocess testsuite run.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestArmRegisterDefinition.py
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestArmRegisterDefinition.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestArmRegisterDefinition.py?rev=360480&r1=360479&r2=360480&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestArmRegisterDefinition.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestArmRegisterDefinition.py Fri May 10 16:03:05 2019
@@ -109,9 +109,7 @@ class TestArmRegisterDefinition(GDBRemot
self.server.responder = MyResponder()
if self.TraceOn():
- interp = self.dbg.GetCommandInterpreter()
- result = lldb.SBCommandReturnObject()
- interp.HandleCommand("log enable gdb-remote packets", result)
+ self.runCmd("log enable gdb-remote packets")
self.dbg.SetDefaultArchitecture("armv7em")
target = self.dbg.CreateTargetWithFileAndArch(None, None)
@@ -128,3 +126,6 @@ class TestArmRegisterDefinition(GDBRemot
pc_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("pc")
self.assertEqual(pc_valobj.GetValueAsUnsigned(), 0x0800d22e)
+
+ if self.TraceOn():
+ self.runCmd("log disable gdb-remote packets")
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py?rev=360480&r1=360479&r2=360480&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py Fri May 10 16:03:05 2019
@@ -40,9 +40,7 @@ class TestNoWatchpointSupportInfo(GDBRem
self.server.responder = MyResponder()
if self.TraceOn():
- interp = self.dbg.GetCommandInterpreter()
- result = lldb.SBCommandReturnObject()
- interp.HandleCommand("log enable gdb-remote packets", result)
+ self.runCmd("log enable gdb-remote packets")
self.dbg.SetDefaultArchitecture("x86_64")
target = self.dbg.CreateTargetWithFileAndArch(None, None)
@@ -62,3 +60,7 @@ class TestNoWatchpointSupportInfo(GDBRem
err.GetDescription(strm)
print("watchpoint failed: %s" % strm.GetData())
self.assertTrue(wp.IsValid())
+
+ if self.TraceOn():
+ self.runCmd("log disable gdb-remote packets")
+
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py?rev=360480&r1=360479&r2=360480&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py Fri May 10 16:03:05 2019
@@ -44,3 +44,6 @@ class TestStopPCs(GDBRemoteTestBase):
self.assertEqual(th1.GetThreadID(), 0x2ff0d)
self.assertEqual(th0.GetFrameAtIndex(0).GetPC(), 0x10001bc00)
self.assertEqual(th1.GetFrameAtIndex(0).GetPC(), 0x10002bc00)
+
+ if self.TraceOn():
+ self.runCmd("log disable gdb-remote packets")
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py?rev=360480&r1=360479&r2=360480&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py Fri May 10 16:03:05 2019
@@ -114,7 +114,8 @@ class TestTargetXMLArch(GDBRemoteTestBas
interp = self.dbg.GetCommandInterpreter()
result = lldb.SBCommandReturnObject()
if self.TraceOn():
- interp.HandleCommand("log enable gdb-remote packets", result)
+ self.runCmd("log enable gdb-remote packets")
+
target = self.dbg.CreateTarget('')
self.assertEqual('', target.GetTriple())
process = self.connect(target)
@@ -122,3 +123,6 @@ class TestTargetXMLArch(GDBRemoteTestBas
interp.HandleCommand("target list", result)
print(result.GetOutput())
self.assertTrue(target.GetTriple().startswith('x86_64-unknown-unknown'))
+
+ if self.TraceOn():
+ self.runCmd("log disable gdb-remote packets")
More information about the lldb-commits
mailing list