aboutsummaryrefslogtreecommitdiff
path: root/tests/cli/cli_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-10-06 19:04:16 +0200
committerJakob Unterwurzacher2019-10-06 19:37:51 +0200
commit1fb18f4a9ef2bbbc6e7c774fa064808a3952bb3f (patch)
tree5e27aa2b53c1af53e280dea269cf0039f499f888 /tests/cli/cli_test.go
parentd361f6e35bb97ef8f060131ea5b29f922e613c49 (diff)
tests: filter leaked fds by prefix
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.
Diffstat (limited to 'tests/cli/cli_test.go')
-rw-r--r--tests/cli/cli_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cli/cli_test.go b/tests/cli/cli_test.go
index d0ac5d8..423afdf 100644
--- a/tests/cli/cli_test.go
+++ b/tests/cli/cli_test.go
@@ -22,9 +22,9 @@ var testPw = []byte("test")
func TestMain(m *testing.M) {
test_helpers.ResetTmpDir(false)
- before := test_helpers.ListFds(0)
+ before := test_helpers.ListFds(0, "")
r := m.Run()
- after := test_helpers.ListFds(0)
+ after := test_helpers.ListFds(0, "")
if len(before) != len(after) {
fmt.Printf("fd leak in test process? before, after:\n%v\n%v\n", before, after)
os.Exit(1)