Rev 4169: Delete faulty test that can leak a subprocess and/or hang the test suite. in file:///home/vila/src/bzr/experimental/parallel-selftest/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Mar 19 17:29:46 GMT 2009
At file:///home/vila/src/bzr/experimental/parallel-selftest/
------------------------------------------------------------
revno: 4169
revision-id: v.ladeuil+lp at free.fr-20090319172945-rh9hk9n71flc93ph
parent: pqm at pqm.ubuntu.com-20090319154145-159h7mmiivu3df6v
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.dev
timestamp: Thu 2009-03-19 18:29:45 +0100
message:
Delete faulty test that can leak a subprocess and/or hang the test suite.
* bzrlib/tests/blackbox/test_breakin.py:
(TestBreakin.test_breakin): Deleted. The spawn process may be left
hanging around under some circumstances.
(TestBreakin.test_breakin_harder): Get some bits from test_breakin
to avoid reducing test coverage.
-------------- 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-19 17:29:45 +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