From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Python 3 test failures Date: Thu, 03 Apr 2014 18:32:29 +0200 Message-ID: <87ppkype5e.fsf_-_@gnu.org> References: <877g7futo0.fsf@gnu.org> <87y4zokho0.fsf@yeeloong.lan> <87fvlwn97l.fsf@gnu.org> <87lhvnikjp.fsf@yeeloong.lan> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVkZA-0003eQ-P2 for guix-devel@gnu.org; Thu, 03 Apr 2014 12:32:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVkZ6-0008LH-3d for guix-devel@gnu.org; Thu, 03 Apr 2014 12:32:36 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:58128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVkZ5-0008L7-Kw for guix-devel@gnu.org; Thu, 03 Apr 2014 12:32:32 -0400 In-Reply-To: <87lhvnikjp.fsf@yeeloong.lan> (Mark H. Weaver's message of "Wed, 02 Apr 2014 15:43:54 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark H Weaver skribis: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > ERROR: test_fork (test.test_pty.PtyTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/tmp/nix-build-python-3.3.3.drv-13/Python-3.3.3/Lib/test/test_pty= .py", line 116, in test_fork > pid, master_fd =3D pty.fork() > File "/tmp/nix-build-python-3.3.3.drv-13/Python-3.3.3/Lib/pty.py", line= 107, in fork > master_fd, slave_fd =3D openpty() > File "/tmp/nix-build-python-3.3.3.drv-13/Python-3.3.3/Lib/pty.py", line= 29, in openpty > master_fd, slave_name =3D _open_terminal() > File "/tmp/nix-build-python-3.3.3.drv-13/Python-3.3.3/Lib/pty.py", line= 70, in _open_terminal > raise os.error('out of pty devices') > OSError: out of pty devices This particular test is fixed by the daemon patch I posted, which makes sure /dev/pts/ptmx is 0666 (I=E2=80=99ll update nix-upstream.) Now I see one remaining failure: --8<---------------cut here---------------start------------->8--- [374/374/1] test_multiprocessing /tmp/nix-build-python-3.3.3.drv-1/Python-3.3.3/Lib/multiprocessing/process.= py:95: ResourceWarning: unclosed self._target(*self._args, **self._kwargs) Warning -- multiprocessing.process._dangling was modified by test_multiproc= essing test test_multiprocessing failed -- Traceback (most recent call last): File "/tmp/nix-build-python-3.3.3.drv-1/Python-3.3.3/Lib/test/test_multip= rocessing.py", line 1035, in test_wait_result self.assertRaises(KeyboardInterrupt, c.wait, 10) AssertionError: KeyboardInterrupt not raised by wait --8<---------------cut here---------------end--------------->8--- This test exercises the =E2=80=98Condition=E2=80=99 API, which implements an inter-process synchronization primitive similar to condition variables, on top of semaphores (sem_open): --8<---------------cut here---------------start------------->8--- def _test_wait_result(cls, c, pid): with c: c.notify() time.sleep(1) if pid is not None: os.kill(pid, signal.SIGINT) def test_wait_result(self): if isinstance(self, ProcessesMixin) and sys.platform !=3D 'win32': pid =3D os.getpid() else: pid =3D None c =3D self.Condition() with c: self.assertFalse(c.wait(0)) self.assertFalse(c.wait(0.1)) p =3D self.Process(target=3Dself._test_wait_result, args=3D(c, = pid)) p.start() self.assertTrue(c.wait(10)) if pid is not None: self.assertRaises(KeyboardInterrupt, c.wait, 10) p.join() --8<---------------cut here---------------end--------------->8--- I thought that the test might be racy, so I tried this patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- Lib/test/test_multiprocessing.py 2014-04-03 18:04:55.000000000 +0200 +++ Lib/test/test_multiprocessing.py 2014-04-03 18:05:08.000000000 +0200 @@ -1012,7 +1012,7 @@ class _TestCondition(BaseTestCase): def _test_wait_result(cls, c, pid): with c: c.notify() - time.sleep(1) + time.sleep(20) if pid is not None: os.kill(pid, signal.SIGINT) @@ -1032,7 +1032,7 @@ class _TestCondition(BaseTestCase): self.assertTrue(c.wait(10)) if pid is not None: - self.assertRaises(KeyboardInterrupt, c.wait, 10) + self.assertRaises(KeyboardInterrupt, c.wait, 60) p.join() --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable It doesn=E2=80=99t help, though. The test passes outside of the chroot. I haven=E2=80=99t tried stracing it= yet. Help welcome! Ludo=E2=80=99. --=-=-=--