lmb / vimto

Run Go tests on a custom kernel
MIT License
18 stars 3 forks source link

fix caching bug #3

Closed lmb closed 8 months ago

lmb commented 8 months ago

Testing many packages concurrently can create the following error:

rename temporary directory: rename /tmp/1080010020
    /tmp/vimto/1000/...: file exists

This is because the caching code assumes that flock can be used to atomically switch between lock modes. However, this isn't the case. Another process may have come along and extracted the image already while we were waiting to acquire the exclusive lock.