Another case where sleep-and-retry avoids file access errors on Windows.
I have a patch pending to create an lldbsuite.support package. I wonder if it would be worth sinking this "rename with retry" (and similar for delete-with-retry) into this library. Then you could call this as:
lldbsuite.support.filesystem.rename_with_retry(src, dst, 1) # Retry up to 1 time
I only mention this because this is now the second time we've had to do this (other time right below), so perhaps we might need this again in the future too.
I don't feel too strongly, so up to you. If you think it's a good idea though, you'll probably need to wait until my CL goes in first so that you can add this method to the package (which doesn't exist yet)