Files
deb-python-eventlet/tests
Quan Tian f72cc96a70 patcher: set locked RLocks' owner only when patching existing locks
For Python 2, patching existing locks replaces RLock._RLock__owner with current
thread ID no matter the old lock is locked or not and thus an unlocked RLock
would have a non None owner (e.g. <_RLock owner=140106584489808 count=0>).
Then if we acquire the RLock in the same thread, the method RLock.acquire would
not invoke the _RLock__block.acquire() since it treats this is a recursive
acquire by checking current thread ID. And then the following RLock.release
would invoke the _RLock__block.release method resulting in the counter of
Semaphore being improved to 2.

There should be only two states being expected for RLock:
1. owner != None and count > 0
2. owner == None and count == 0

This patch fixs it by only setting locked RLocks' owner during patching.
2017-05-10 19:32:43 -07:00
..
2014-11-12 09:05:10 +00:00
2014-08-27 10:21:55 +04:00
2014-08-27 10:21:55 +04:00
2017-01-05 09:06:15 +03:00
2014-10-11 01:41:30 +01:00
2014-08-27 10:21:55 +04:00
2016-01-06 23:58:45 +01:00
2014-08-27 10:21:55 +04:00
2014-08-27 10:21:55 +04:00
2016-02-12 20:42:03 +05:00

The tests are intended to be run using Nose.  
http://somethingaboutorange.com/mrl/projects/nose/

To run tests, simply install nose, and then, in the eventlet tree, do:
   $ nosetests

That's it!  Its output is the same as unittest's output.  It tends to emit a lot of tracebacks from various poorly-behaving tests, but they still (generally) pass.