消息 [132330]
For clarity, while making unlink more robust is no bad thing, the error occurs when the unlink *succeeds* but a subsequent create of the same name fails. This happens when an indexer, Virus scanner or TortoiseSvn etc. has opened the file with SHARE_DELETE. This allows a DeleteFile to succeed but continues to hold an open handle on the file. A following test which uses an identically named file (such as the global TESTFN) will fail if not enough time has elapsed for the background process to release its handle. A good candidate to see this in action is the test for tarfile.
I did start to undertake a conversion of TESTFN to a named temporary, but it started to sprawl all over the place and came up against a number of corner cases (eg where tests deliberately wanted two filenames to be the same) so I gave up. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2011-03-27 14:23:40 | tim.golden | 修改 | recipients:
+ tim.golden, loewis, jafo, jaraco, ncoghlan, pitrou, techtonik, r.david.murray, brian.curtin, asvetlov, flox |
| 2011-03-27 14:23:37 | tim.golden | 链接 | issue7443 messages |
| 2011-03-27 14:23:37 | tim.golden | 创建 | |
|