diff options
author | Jakob Unterwurzacher | 2019-01-01 22:01:49 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2019-01-01 22:01:49 +0100 |
commit | 10de105c13e4ef512fe83b8c1074fc453f3e70ff (patch) | |
tree | 437c4a1aac2c2050d87ca0c9fbf2d400dc6eadad /tests/defaults/ctlsock_test.go | |
parent | cd0ec342b9692c71c50c77caa7b9cfde27426e4d (diff) |
tests: detect fd leaks on unmount
For now, this only prints a message but does not fail the tests.
Diffstat (limited to 'tests/defaults/ctlsock_test.go')
-rw-r--r-- | tests/defaults/ctlsock_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/defaults/ctlsock_test.go b/tests/defaults/ctlsock_test.go index b987bf6..212ded4 100644 --- a/tests/defaults/ctlsock_test.go +++ b/tests/defaults/ctlsock_test.go @@ -4,6 +4,7 @@ import ( "os" "syscall" "testing" + "time" "github.com/rfjakob/gocryptfs/internal/ctlsock" "github.com/rfjakob/gocryptfs/tests/test_helpers" @@ -37,6 +38,9 @@ func TestCtlSock(t *testing.T) { t.Errorf("We should get a warning about non-canonical paths here") } } + // Give the running gocryptfs process a little bit of time to close lingering + // sockets. Avoid triggering the FD leak detector. + time.Sleep(1 * time.Millisecond) } func TestCtlSockDecrypt(t *testing.T) { @@ -87,6 +91,9 @@ func TestCtlSockDecrypt(t *testing.T) { t.Errorf("want=%q got=%q", p, response.Result) } } + // Give the running gocryptfs process a little bit of time to close lingering + // sockets. Avoid triggering the FD leak detector. + time.Sleep(1 * time.Millisecond) } func TestCtlSockDecryptCrash(t *testing.T) { |