procfs
procfs copied to clipboard
tests fail when used with go modules
Both the main procfs package and the xfs package fail on my machine.
Here's a reproducer:
#!/bin/sh
set -ex
t=$(mktemp -d)
trap 'rm -r $t' EXIT
cd $t
cat >ex.go <<.
package main
import (
_ "github.com/prometheus/procfs"
)
func main() {
println("example")
}
.
go mod init example
go test all
The tests should automatically unpack fixtures.ttar if they need the files.
Happy to review a PR to support go modules, if it's simple. For everything more involved I'd wait until go modules have matured.
That's fair. I'll submit something once golang/go#27492 has an answer and there's a supported place/way to create files during tests.