[Lldb-commits] [lldb] r116481 - /lldb/trunk/test/signal/TestSendSignal.py

Johnny Chen johnny.chen at apple.com
Thu Oct 14 08:58:53 PDT 2010


Author: johnny
Date: Thu Oct 14 10:58:53 2010
New Revision: 116481

URL: http://llvm.org/viewvc/llvm-project?rev=116481&view=rev
Log:
Add more comments and wait a little bit after resuming the inferior process before
sending it a signal.

Modified:
    lldb/trunk/test/signal/TestSendSignal.py

Modified: lldb/trunk/test/signal/TestSendSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/signal/TestSendSignal.py?rev=116481&r1=116480&r2=116481&view=diff
==============================================================================
--- lldb/trunk/test/signal/TestSendSignal.py (original)
+++ lldb/trunk/test/signal/TestSendSignal.py Thu Oct 14 10:58:53 2010
@@ -53,14 +53,23 @@
         output = self.res.GetOutput()
         pid = re.match("Process (.*) Stopped", output).group(1)
 
-        # After resuming the process, immediately send a SIGUSR1 signal.
+        # After resuming the process, send it a SIGUSR1 signal.
+
+        # It is necessary at this point to make command interpreter interaction
+        # be asynchronous, because we want to resume the process and to send it
+        # a signal.
         self.dbg.SetAsync(True)
         self.runCmd("process continue")
+        # Insert a delay of 1 second before doing the signaling stuffs.
+        time.sleep(1)
+
         self.runCmd("process handle -n False -p True -s True SIGUSR1")
         #os.kill(int(pid), signal.SIGUSR1)
         self.runCmd("process signal SIGUSR1")
 
+        # Insert a delay of 1 second before checking the process status.
         time.sleep(1)
+        # Make the interaction mode be synchronous again.
         self.dbg.SetAsync(False)
         self.expect("process status", STOPPED_DUE_TO_SIGNAL,
             startstr = "Process %s Stopped" % pid,





More information about the lldb-commits mailing list