Message102720
If the problem with the fix is that lots of tests use test_support.unlink, then I don't see why the rename dance can't be implemented in test_support.unlink. (Possibly conditioned on whether or not the tests are running on a windows platform.) Dealing with unlink problems is why that method exists in the first place.
There are probably places in the test suite that *don't* use test_support.unlink, though, so fixing test_support.unlink will not necessarily fix all of the problems. We'll have to fix those other tests (probably by using the new test_support.unlink) as we find them.
An actual patch will need a test that doesn't rely on win32file (ctypes would be OK). It may be necessary to rename to a unique filename, too. (To be clear, I think a unit test that reproduces the problem by doing an open with FILE_SHARE_DELETE is fine, we don't need a test that reproduces the race condition itself. The windows experts will correct me if I'm wrong :)
I'm changing the stage to patch needed because it seems to me that using a technique like rename that doesn't introduce additional delays into the test suite is to be preferred. |
|
Date |
User |
Action |
Args |
2010-04-09 13:05:34 | r.david.murray | set | recipients:
+ r.david.murray, loewis, jafo, jaraco, techtonik, tim.golden, brian.curtin, asvetlov, flox |
2010-04-09 13:05:34 | r.david.murray | set | messageid: <1270818334.21.0.114788890224.issue7443@psf.upfronthosting.co.za> |
2010-04-09 13:05:32 | r.david.murray | link | issue7443 messages |
2010-04-09 13:05:31 | r.david.murray | create | |
|