[Lldb-commits] [lldb] r221927 - Specify checksums properly for llgs test suite packets.

Stephane Sezer sas at cd80.net
Thu Nov 13 13:39:24 PST 2014


Author: sas
Date: Thu Nov 13 15:39:24 2014
New Revision: 221927

URL: http://llvm.org/viewvc/llvm-project?rev=221927&view=rev
Log:
Specify checksums properly for llgs test suite packets.

Summary: These checksums are ignored by llgs but some implementations require them to be specified properly.

Test Plan: Re-run llgs tests with the checksums and make sure we don't break anything.

Reviewers: tfiala, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D6254

Modified:
    lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteAuxvSupport.py
    lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteExpeditedRegisters.py
    lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteRegisterState.py
    lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteThreadsInStopReply.py
    lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemote_qThreadStopInfo.py
    lldb/trunk/test/tools/lldb-gdbserver/TestLldbGdbServer.py
    lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py

Modified: lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteAuxvSupport.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteAuxvSupport.py?rev=221927&r1=221926&r2=221927&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteAuxvSupport.py (original)
+++ lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteAuxvSupport.py Thu Nov 13 15:39:24 2014
@@ -17,7 +17,7 @@ class TestGdbRemoteAuxvSupport(gdbremote
         # us in a stopped state.
         self.test_sequence.add_log_lines([
             # Start the inferior...
-            "read packet: $c#00",
+            "read packet: $c#63",
             # ... match output....
             { "type":"output_match", "regex":r"^message:main entered\r\n$" },
             ], True)

Modified: lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteExpeditedRegisters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteExpeditedRegisters.py?rev=221927&r1=221926&r2=221927&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteExpeditedRegisters.py (original)
+++ lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteExpeditedRegisters.py Thu Nov 13 15:39:24 2014
@@ -10,7 +10,7 @@ class TestGdbRemoteExpeditedRegisters(gd
         procs = self.prep_debug_monitor_and_inferior(inferior_args=["sleep:2"])
         self.test_sequence.add_log_lines([
             # Start up the inferior.
-            "read packet: $c#00",
+            "read packet: $c#63",
             # Immediately tell it to stop.  We want to see what it reports.
             "read packet: {}".format(chr(03)),
             {"direction":"send", "regex":r"^\$T([0-9a-fA-F]+)([^#]+)#[0-9a-fA-F]{2}$", "capture":{1:"stop_result", 2:"key_vals_text"} },

Modified: lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteRegisterState.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteRegisterState.py?rev=221927&r1=221926&r2=221927&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteRegisterState.py (original)
+++ lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteRegisterState.py Thu Nov 13 15:39:24 2014
@@ -18,7 +18,7 @@ class TestGdbRemoteRegisterState(gdbremo
         self.add_threadinfo_collection_packets()
         self.test_sequence.add_log_lines([
             # Start the inferior...
-            "read packet: $c#00",
+            "read packet: $c#63",
             # ... match output....
             { "type":"output_match", "regex":r"^message:main entered\r\n$" },
             ], True)

Modified: lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteThreadsInStopReply.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteThreadsInStopReply.py?rev=221927&r1=221926&r2=221927&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteThreadsInStopReply.py (original)
+++ lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemoteThreadsInStopReply.py Thu Nov 13 15:39:24 2014
@@ -6,7 +6,7 @@ from lldbtest import *
 class TestGdbRemoteThreadsInStopReply(gdbremote_testcase.GdbRemoteTestCaseBase):
 
     ENABLE_THREADS_IN_STOP_REPLY_ENTRIES = [
-        "read packet: $QListThreadsInStopReply#00",
+        "read packet: $QListThreadsInStopReply#21",
         "send packet: $OK#00",
     ]
 
@@ -23,7 +23,7 @@ class TestGdbRemoteThreadsInStopReply(gd
         if post_startup_log_lines:
             self.test_sequence.add_log_lines(post_startup_log_lines, True)
         self.test_sequence.add_log_lines([
-            "read packet: $c#00"
+            "read packet: $c#63"
             ], True)
         context = self.expect_gdbremote_sequence()
         self.assertIsNotNone(context)
@@ -46,7 +46,7 @@ class TestGdbRemoteThreadsInStopReply(gd
         # Run, then stop the process, grab the stop reply content.
         self.reset_test_sequence()
         self.test_sequence.add_log_lines([
-            "read packet: $c#00",
+            "read packet: $c#63",
             "read packet: {}".format(chr(03)),
             {"direction":"send", "regex":r"^\$T([0-9a-fA-F]+)([^#]+)#[0-9a-fA-F]{2}$", "capture":{1:"stop_result", 2:"key_vals_text"} },
             ], True)

Modified: lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemote_qThreadStopInfo.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemote_qThreadStopInfo.py?rev=221927&r1=221926&r2=221927&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemote_qThreadStopInfo.py (original)
+++ lldb/trunk/test/tools/lldb-gdbserver/TestGdbRemote_qThreadStopInfo.py Thu Nov 13 15:39:24 2014
@@ -19,7 +19,7 @@ class TestGdbRemote_qThreadStopInfo(gdbr
         # Assumes test_sequence has anything added needed to setup the initial state.
         # (Like optionally enabling QThreadsInStopReply.)
         self.test_sequence.add_log_lines([
-            "read packet: $c#00"
+            "read packet: $c#63"
             ], True)
         context = self.expect_gdbremote_sequence()
         self.assertIsNotNone(context)

Modified: lldb/trunk/test/tools/lldb-gdbserver/TestLldbGdbServer.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-gdbserver/TestLldbGdbServer.py?rev=221927&r1=221926&r2=221927&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-gdbserver/TestLldbGdbServer.py (original)
+++ lldb/trunk/test/tools/lldb-gdbserver/TestLldbGdbServer.py Thu Nov 13 15:39:24 2014
@@ -189,7 +189,7 @@ class LldbGdbServerTestCase(gdbremote_te
         self.add_no_ack_remote_stream()
         self.add_verified_launch_packets(launch_args)
         self.test_sequence.add_log_lines(
-            ["read packet: $c#00",
+            ["read packet: $c#63",
              "send packet: $W00#00"],
             True)
 
@@ -755,7 +755,7 @@ class LldbGdbServerTestCase(gdbremote_te
 
         # Launch/attach.  (In our case, this should only ever be launched since we need inferior stdout/stderr).
         procs = self.prep_debug_monitor_and_inferior(inferior_args=inferior_args)
-        self.test_sequence.add_log_lines(["read packet: $c#00"], True)
+        self.test_sequence.add_log_lines(["read packet: $c#63"], True)
         context = self.expect_gdbremote_sequence()
 
         # Let the inferior process have a few moments to start up the thread when launched.
@@ -805,7 +805,7 @@ class LldbGdbServerTestCase(gdbremote_te
                  # Need to rectify behavior here.  The linux behavior is more intuitive to me since we're essentially swapping out
                  # an about-to-be-delivered signal (for which we already sent a stop packet) to a different signal.
                  # {"direction":"send", "regex":r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);", "capture":{1:"stop_signo", 2:"stop_thread_id"} },
-                 #  "read packet: $c#00",
+                 #  "read packet: $c#63",
                  { "type":"output_match", "regex":r"^received SIGUSR1 on thread id: ([0-9a-fA-F]+)\r\nthread ([0-9a-fA-F]+): past SIGSEGV\r\n", "capture":{ 1:"print_thread_id", 2:"post_handle_thread_id" } },
                 ],
                 True)
@@ -869,7 +869,7 @@ class LldbGdbServerTestCase(gdbremote_te
         self.test_sequence.add_log_lines(
             [
              # Start running after initial stop.
-             "read packet: $c#00",
+             "read packet: $c#63",
              # Match output line that prints the memory address of the message buffer within the inferior. 
              # Note we require launch-only testing so we can get inferior otuput.
              { "type":"output_match", "regex":r"^data address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"message_address"} },
@@ -955,7 +955,7 @@ class LldbGdbServerTestCase(gdbremote_te
         self.test_sequence.add_log_lines(
             [
              # Start running after initial stop.
-             "read packet: $c#00",
+             "read packet: $c#63",
              # Match output line that prints the memory address of the message buffer within the inferior. 
              # Note we require launch-only testing so we can get inferior otuput.
              { "type":"output_match", "regex":r"^code address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"code_address"} },
@@ -1018,7 +1018,7 @@ class LldbGdbServerTestCase(gdbremote_te
         self.test_sequence.add_log_lines(
             [
              # Start running after initial stop.
-             "read packet: $c#00",
+             "read packet: $c#63",
              # Match output line that prints the memory address of the message buffer within the inferior. 
              # Note we require launch-only testing so we can get inferior otuput.
              { "type":"output_match", "regex":r"^stack address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"stack_address"} },
@@ -1081,7 +1081,7 @@ class LldbGdbServerTestCase(gdbremote_te
         self.test_sequence.add_log_lines(
             [
              # Start running after initial stop.
-             "read packet: $c#00",
+             "read packet: $c#63",
              # Match output line that prints the memory address of the message buffer within the inferior. 
              # Note we require launch-only testing so we can get inferior otuput.
              { "type":"output_match", "regex":r"^heap address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"heap_address"} },
@@ -1146,7 +1146,7 @@ class LldbGdbServerTestCase(gdbremote_te
         self.add_process_info_collection_packets()
         self.test_sequence.add_log_lines(
             [# Start running after initial stop.
-             "read packet: $c#00",
+             "read packet: $c#63",
              # Match output line that prints the memory address of the function call entry point.
              # Note we require launch-only testing so we can get inferior otuput.
              { "type":"output_match", "regex":r"^code address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"function_address"} },
@@ -1226,7 +1226,7 @@ class LldbGdbServerTestCase(gdbremote_te
             # Verify the stub could unset it.
             "send packet: $OK#00",
             # Continue running.
-            "read packet: $c#00",
+            "read packet: $c#63",
             # We should now receive the output from the call.
             { "type":"output_match", "regex":r"^hello, world\r\n$" },
             # And wait for program completion.
@@ -1290,7 +1290,7 @@ class LldbGdbServerTestCase(gdbremote_te
         self.test_sequence.add_log_lines(
             [
              # Start running after initial stop.
-             "read packet: $c#00",
+             "read packet: $c#63",
              # Match output line that prints the memory address of the message buffer within the inferior. 
              # Note we require launch-only testing so we can get inferior otuput.
              { "type":"output_match", "regex":r"^data address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"message_address"} },
@@ -1314,7 +1314,7 @@ class LldbGdbServerTestCase(gdbremote_te
         self.test_sequence.add_log_lines(
             ["read packet: $M{0:x},{1:x}:{2}#00".format(message_address, len(hex_encoded_message)/2, hex_encoded_message),
              "send packet: $OK#00",
-             "read packet: $c#00",
+             "read packet: $c#63",
              { "type":"output_match", "regex":r"^message: (.+)\r\n$", "capture":{ 1:"printed_message"} },
              "send packet: $W00#00",
             ], True)

Modified: lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py?rev=221927&r1=221926&r2=221927&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py (original)
+++ lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py Thu Nov 13 15:39:24 2014
@@ -408,13 +408,13 @@ class GdbRemoteTestCaseBase(TestBase):
 
     def add_thread_suffix_request_packets(self):
         self.test_sequence.add_log_lines(
-            ["read packet: $QThreadSuffixSupported#00",
+            ["read packet: $QThreadSuffixSupported#e4",
              "send packet: $OK#00",
             ], True)
 
     def add_process_info_collection_packets(self):
         self.test_sequence.add_log_lines(
-            ["read packet: $qProcessInfo#00",
+            ["read packet: $qProcessInfo#dc",
               { "direction":"send", "regex":r"^\$(.+)#[0-9a-fA-F]{2}$", "capture":{1:"process_info_raw"} }],
             True)
 
@@ -626,7 +626,7 @@ class GdbRemoteTestCaseBase(TestBase):
         if (do_continue):
             self.test_sequence.add_log_lines(
                 [# Continue the inferior.
-                 "read packet: $c#00",
+                 "read packet: $c#63",
                  # Expect a breakpoint stop report.
                  {"direction":"send", "regex":r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);", "capture":{1:"stop_signo", 2:"stop_thread_id"} },
                  ], True)        
@@ -1035,7 +1035,7 @@ class GdbRemoteTestCaseBase(TestBase):
 
     def add_vCont_query_packets(self):
         self.test_sequence.add_log_lines([
-            "read packet: $vCont?#00",
+            "read packet: $vCont?#49",
             {"direction":"send", "regex":r"^\$(vCont)?(.*)#[0-9a-fA-F]{2}$", "capture":{2:"vCont_query_response" } },
             ], True)
 
@@ -1124,7 +1124,7 @@ class GdbRemoteTestCaseBase(TestBase):
         # Run the process
         self.test_sequence.add_log_lines(
             [# Start running after initial stop.
-             "read packet: $c#00",
+             "read packet: $c#63",
              # Match output line that prints the memory address of the function call entry point.
              # Note we require launch-only testing so we can get inferior otuput.
              { "type":"output_match", "regex":r"^code address: 0x([0-9a-fA-F]+)\r\ndata address: 0x([0-9a-fA-F]+)\r\ndata address: 0x([0-9a-fA-F]+)\r\n$", 





More information about the lldb-commits mailing list