[issue11867] Make test_mailbox deterministic

2011-12-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset c9facd251725 by Charles-François Natali in branch '2.7': Followup to issue #11867: Use socketpair(), since FreeBSD < 8 doesn't really http://hg.python.org/cpython/rev/c9facd251725 New changeset 9dee8a095faf by Charles-François Natali in branch '3.2

[issue11867] Make test_mailbox deterministic

2011-12-19 Thread Charles-François Natali
Charles-François Natali added the comment: Should be fixed now, thanks! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue11867] Make test_mailbox deterministic

2011-12-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset c6d41dd60d2d by Charles-François Natali in branch '2.7': Issue #11867: Make test_mailbox.test_lock_conflict deterministic (and fix a http://hg.python.org/cpython/rev/c6d41dd60d2d New changeset 0053b7c68a02 by Charles-François Natali in branch '3.2'

[issue11867] Make test_mailbox deterministic

2011-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Charles-François's patch looks good to me. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-

[issue11867] Make test_mailbox deterministic

2011-12-19 Thread Charles-François Natali
Charles-François Natali added the comment: > Probably because I'm a threading/multiprocessing neophyte :) That's a very good reason :-) Here's a version using two multiprocessing events. Note that I use timeouts for wait() just to avoid being stuck if something goes wrong: the test now runs in

[issue11867] Make test_mailbox deterministic

2011-12-18 Thread R. David Murray
R. David Murray added the comment: Probably because I'm a threading/multiprocessing neophyte :) (Though I just learned a bunch about programming with threads recently...) -- ___ Python tracker __

[issue11867] Make test_mailbox deterministic

2011-12-18 Thread Charles-François Natali
Charles-François Natali added the comment: There was a recent buildbot failure on test_lock_conflict() because of a race. Looking at your patch, I must be missing something, but why not simply use a multiprocessing condition to signal when the parent process has acquired the lock? Otherwise yo

[issue11867] Make test_mailbox deterministic

2011-04-20 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: 'Was not allowed to look yesterday. If the child only closes and not self.c_sock_shutdown = True (shutdown is an ugly word for a child anyway) then (and i hope Apple did not modify the BSD network stack): 12:59 ~/tmp $ python3 -E -Wd -m

[issue11867] Make test_mailbox deterministic

2011-04-19 Thread R. David Murray
R. David Murray added the comment: I think the fix is to either put a try/except around the socket shutdown call, or to remove it entirely (I think things will still work right on linux without it). If you leave the self.c_sock_close = True in, it should take care of the resource warning. -

[issue11867] Make test_mailbox deterministic

2011-04-19 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Short glance into it, and after commenting out self.c_sock_close = self.c_sock_shutdown = True in the parent process it ends up as (maybe i can spend more time this evening): 15:36 ~/tmp $ python3 -E -Wd -m test -r -w -uall test_mailbox Using rand

[issue11867] Make test_mailbox deterministic

2011-04-19 Thread R. David Murray
R. David Murray added the comment: Thanks for testing this. I was afraid something like that would happen, since socket implementations are different on different platforms. I presume you ran it on OSX. Now I have to decide if I want to fix it, or if I should just switch to using threads.

[issue11867] Make test_mailbox deterministic

2011-04-19 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Nice ping pong you play.. I, buildbot get: Using random seed 2215045 [1/1] test_mailbox test test_mailbox failed -- multiple errors occurred; run in verbose mode for details test test_mailbox failed -- Traceback (most recent call last): File "/Users/

[issue11867] Make test_mailbox deterministic

2011-04-18 Thread R. David Murray
Changes by R. David Murray : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue11867] Make test_mailbox deterministic

2011-04-18 Thread R. David Murray
New submission from R. David Murray : Attached is a patch to remove the last sleeps from test_mailbox. I believe this makes the test suite deterministic. It also shaves 4 seconds of fixed overhead off the test run time. -- components: Tests files: mailbox_fork_with_ipc.patch keywords