Rev 4169: Commit fix in a new thread to handle review comments in file:///home/vila/src/bzr/experimental/parallel-selftest/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Mar 20 06:56:07 GMT 2009
At file:///home/vila/src/bzr/experimental/parallel-selftest/
------------------------------------------------------------
revno: 4169
revision-id: v.ladeuil+lp at free.fr-20090320065607-j2vi19cy7x5uhmr9
parent: pqm at pqm.ubuntu.com-20090319154145-159h7mmiivu3df6v
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: fixes
timestamp: Fri 2009-03-20 07:56:07 +0100
message:
Commit fix in a new thread to handle review comments
-------------- next part --------------
=== modified file 'bzrlib/tests/blackbox/test_breakin.py'
--- a/bzrlib/tests/blackbox/test_breakin.py 2009-02-23 15:29:35 +0000
+++ b/bzrlib/tests/blackbox/test_breakin.py 2009-03-20 06:56:07 +0000
@@ -47,29 +47,16 @@
# port 0 means to allocate any port
_test_process_args = ['serve', '--port', 'localhost:0']
- def test_breakin(self):
- # Break in to a debugger while bzr is running
- # we need to test against a command that will wait for
- # a while -- bzr serve should do
+ def test_breakin_harder(self):
+ self._dont_SIGQUIT_on_darwin()
proc = self.start_bzr_subprocess(self._test_process_args,
env_changes=dict(BZR_SIGQUIT_PDB=None))
# wait for it to get started, and print the 'listening' line
proc.stderr.readline()
- # first sigquit pops into debugger
+ # break into the debugger
os.kill(proc.pid, signal.SIGQUIT)
- proc.stdin.write("q\n")
- time.sleep(.5)
err = proc.stderr.readline()
self.assertContainsRe(err, r'entering debugger')
-
- def test_breakin_harder(self):
- self._dont_SIGQUIT_on_darwin()
- proc = self.start_bzr_subprocess(self._test_process_args,
- env_changes=dict(BZR_SIGQUIT_PDB=None))
- # wait for it to get started, and print the 'listening' line
- proc.stderr.readline()
- # break into the debugger
- os.kill(proc.pid, signal.SIGQUIT)
# now send a second sigquit, which should cause it to exit. That
# won't happen until the original signal has been noticed by the
# child and it's run its signal handler. We don't know quite how long
@@ -83,7 +70,7 @@
r = os.waitpid(proc.pid, os.WNOHANG)
if r != (0, 0):
# high bit says if core was dumped; we don't care
- self.assertEquals(r[1] & 0x7f, signal.SIGQUIT)
+ self.assertEquals(signal.SIGQUIT, r[1] & 0x7f)
break
else:
self.fail("subprocess wasn't terminated by repeated SIGQUIT")
More information about the bazaar-commits
mailing list