From 1fb18f4a9ef2bbbc6e7c774fa064808a3952bb3f Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 6 Oct 2019 19:04:16 +0200 Subject: 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. --- tests/cli/cli_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/cli') 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) -- cgit v1.2.3