tests: bump maxCacheFds to 3

As the dirCache now has 3 entries, the tests should accept
up to 3 extra fds without declaring an fd leak.
This commit is contained in:
Jakob Unterwurzacher 2019-01-04 23:50:01 +01:00
parent c32066c5b0
commit 65eded4a22
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,8 @@ import (
const (
// Number of entries in the dirCache. Three entries work well for two
// (probably also three) parallel tar extracts (hit rate around 92%).
// Keen in sync with test_helpers.maxCacheFds !
// TODO: How to share this constant without causing in import cycle?
dirCacheSize = 3
// Enable Lookup/Store/Clear debug messages
enableDebugMessages = false

View File

@ -123,7 +123,9 @@ func UnmountPanic(dir string) {
}
// gocryptfs may hold up to maxCacheFds open for caching
const maxCacheFds = 1
// Keen in sync with fusefrontend.dirCacheSize
// TODO: How to share this constant without causing in import cycle?!
const maxCacheFds = 3
// UnmountErr tries to unmount "dir", retrying 10 times, and returns the
// resulting error.