Add more comments and wait a little bit after resuming the inferior process before

sending it a signal.

llvm-svn: 116481
This commit is contained in:
Johnny Chen 2010-10-14 15:58:53 +00:00
parent 5816ccd4b5
commit b7fd763369
1 changed files with 10 additions and 1 deletions

View File

@ -53,14 +53,23 @@ class SendSignalTestCase(TestBase):
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,