summaryrefslogtreecommitdiff
path: root/tests/test_helpers/mount_unmount.go
AgeCommit message (Collapse)Author
2019-10-06tests: filter leaked fds by prefixJakob Unterwurzacher
When running $ go test ./tests/matrix/ in isolation, it failed like this: fd leak? before, after: [0r=/dev/null 3w=/dev/null 5r=/proc/8078/fd (hidden:4)] [0r=/dev/null 3w=/dev/null 5w=/tmp/go-build366655199/b001/testlog.txt 7r=/proc/8078/fd (hidden:4)] Filter by prefix to get rid of this spurious test failure.
2019-10-06tests: clarify which process seems to be leaking fdsJakob Unterwurzacher
The tests check if they leak fds themselves, but we also check if gocryptfs leaks fds. Clarify what is what in the error message.
2019-09-08test_helpers: ListFds: handle an exited process gracefullyJakob Unterwurzacher
This used to dump a backtrace to the console which obscured what is going on.
2019-05-01test_helpers: better function comments for InitFS and MountJakob Unterwurzacher
It's confusing that you must pass "-extpass" for Mount but not for InitFS. Note that in the comment.
2019-01-15tests: Increase timeout in Mount() function.Sebastian Lackner
This avoids sporadic test failures on macOS.
2019-01-14tests: reduce noise on MacOSJakob Unterwurzacher
This should get rid of Openat: O_NOFOLLOW missing: flags = 0x0 Fchmodat: adding missing AT_SYMLINK_NOFOLLOW flag sys_common_test.go:203: chmod on symlink should have failed, but did not. New mode=0333 UnmountErr: "[...]/057376762.mnt" was not found in MountInfo, cannot check for FD leak and add some context to --- FAIL: TestUtimesNano (0.00s) matrix_test.go:628: no such file or directory See https://github.com/rfjakob/gocryptfs/pull/343#issuecomment-453888006 for full test output
2019-01-05A few more spelling fixes.Sebastian Lackner
2019-01-04tests: bump maxCacheFds to 3Jakob Unterwurzacher
As the dirCache now has 3 entries, the tests should accept up to 3 extra fds without declaring an fd leak.
2019-01-03tests: allow one extra fd in fd leak detector (dirCache)Jakob Unterwurzacher
The gocryptfs process may keep one fd open for up to one second in the dirCache.
2019-01-02tests: retry longer when we see a fd leakJakob Unterwurzacher
Hopefully gets rid of the false positives on travis.
2019-01-02tests: add fd leak retry logic to UnmountErr, really return errorJakob Unterwurzacher
Give the gocryptfs process one extra millisecond to close files. Allows us to drop several other sleeps. UnmountErr now really returns an error when it detects an fd leak instead of just printing a message.
2019-01-02tests: ListFds(): filter out pipe and eventpoll fdsJakob Unterwurzacher
These are created on demand by the Go runtime and are usually not interesting.
2019-01-02tests: make MountInfo field accessibleJakob Unterwurzacher
Tests outside the test_helpers package may want to look at this.
2019-01-01tests: ListFds: show r/w statusJakob Unterwurzacher
Also, drop entries that disappear while we stat them.
2019-01-01tests: split mount_unmount.go from helpers.goJakob Unterwurzacher
With the FD leak logic, the mount/unmount functions have become complex enough to give them their own file.