Author jkloth
Recipients jkloth
Date 2012-07-30.02:14:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343614495.69.0.283818579392.issue15496@psf.upfronthosting.co.za>
In-reply-to
Content
Currently, removing directories during testing on Windows w/NTFS can causing sporadic failures due to access denied errors.  This is caused by other processes getting a handle to the directory itself (change notifications) or a handle to a file within the directory.  The most notable offender is the Indexing Service.

Most (but not all!) external programs can be configured to ignore the development directory.  For example, the Indexing Service can be disabled or have those directories ignored.  TortoiseSVN is another offender that can exclude directories but each directory needs to be listed separately so it is easy to forgot one.  On my machine I have programs that simply do not have an option to ignore any directories thus causing some grief during testing.

The attached patch to test.support eliminates the need to disable or and ignores to any programs (tested on a Win7-x64 i7-3770K@4.3GHz).

It achieves this by checking for the removal of the directory before returning to the caller.  It performs an exponential backoff timeout loop that amounts to a total of ~1 second in the worst case.  If the directory is not removed from the filesystem by then, it will probably be in error anyway.  However, the loop is seldom executed more than once.
History
Date User Action Args
2012-07-30 02:14:56jklothsetrecipients: + jkloth
2012-07-30 02:14:55jklothsetmessageid: <1343614495.69.0.283818579392.issue15496@psf.upfronthosting.co.za>
2012-07-30 02:14:54jklothlinkissue15496 messages
2012-07-30 02:14:54jklothcreate