I've noticed what looks at its surface that some code that is covered doesn't show up in the cover profile data. Unfortunately, I don't have a minimal example as I have no idea how to drill down. So please bear with my explanations and hopefully it's a problem between VT100 and chair, I just don't see it yet.
I see the same behavior with go 1.22.0 as well as 1.21.7.
GOCOVERTMPDIR="$(mktemp -d)"
trap 'rm -rf -- "$GOCOVERTMPDIR"' EXIT
go test -cover -v -race -exec sudo -tags ${BUILDTAGS} -p=1 \
-count=1 ./... -args -test.gocoverdir="$GOCOVERTMPDIR"
go tool covdata textfmt -i="$GOCOVERTMPDIR" -o=coverage.out
go tool cover -html=coverage.out -o=coverage.html
if veth, ok := link.(*netlink.Veth); ok {
Expect(rand.Read(randbytes)).Error().NotTo(HaveOccurred())
peername := prefix + hex.EncodeToString(randbytes)
veth.PeerName = peername
}
This coverage behavior should be hopefully reprodroducable by cloning the repository and running "make coverage" in its top-level directory.