]> Cypherpunks repositories - gostls13.git/commit
runtime/coverage: add missing file close in test support helper
authorThan McIntosh <thanm@google.com>
Wed, 21 Dec 2022 16:03:16 +0000 (11:03 -0500)
committerThan McIntosh <thanm@google.com>
Wed, 21 Dec 2022 20:18:10 +0000 (20:18 +0000)
commitfadd77c05b0f6633d753da61c74a7ed81959b252
tree1d2167acfe8b876527b2736796fbaf1611457961
parentc9a10d48a8f0e8479f5b9d98c5bd81b64a90d23d
runtime/coverage: add missing file close in test support helper

The processPod() helper (invoked by processCoverTestDir, which is in
turn called by _testmain.go) was opening and reading counter data
files, but never closing them. Add a call to close the files after
they have been read.

Fixes #57407.

Change-Id: If9a489f92e4bab72c5b2df8697e14420a6f7b8f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/458835
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/coverage/testsupport.go