summaryrefslogtreecommitdiff
path: root/tests/matrix
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-01-01 19:34:12 +0100
committerJakob Unterwurzacher2019-01-01 19:34:12 +0100
commit817c485bb7dbd890a15aca683d6004437772c659 (patch)
tree9a06ebc358dd035a4ae6031e80c0314e0ca119eb /tests/matrix
parent60e7a0ca9f2a2bcf8a727f606db134d60e9a5e18 (diff)
tests: save gocryptfs process id in test_helpers.MountPID
This will allow to tests to monitor fd usage and maybe other things.
Diffstat (limited to 'tests/matrix')
-rw-r--r--tests/matrix/matrix_test.go2
1 files changed, 2 insertions, 0 deletions
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)