From 817c485bb7dbd890a15aca683d6004437772c659 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 1 Jan 2019 19:34:12 +0100 Subject: tests: save gocryptfs process id in test_helpers.MountPID This will allow to tests to monitor fd usage and maybe other things. --- tests/matrix/matrix_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/matrix') diff --git a/tests/matrix/matrix_test.go b/tests/matrix/matrix_test.go index 8de835f..660f9d7 100644 --- a/tests/matrix/matrix_test.go +++ b/tests/matrix/matrix_test.go @@ -76,6 +76,8 @@ func TestMain(m *testing.M) { test_helpers.MountOrExit(test_helpers.DefaultCipherDir, test_helpers.DefaultPlainDir, opts...) before := test_helpers.ListFds() r := m.Run() + // Catch fd leaks in the tests. NOTE: this does NOT catch leaks in + // the gocryptfs FUSE process, but only in the tests that access it! after := test_helpers.ListFds() if len(before) != len(after) { fmt.Printf("fd leak? before, after:\n%v\n%v\n", before, after) -- cgit v1.2.3