From 9acd2d60e76649663a1e64b1ad00d2173c68c5fe Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Wed, 26 Jun 2019 15:25:16 -0400 Subject: [PATCH] misc/cgo/errors: fix TestPointerChecks when GO111MODULE=on Change-Id: I4e9e46f03c9c43df1d0c6995f3baedd2e1a04c6a Reviewed-on: https://go-review.googlesource.com/c/go/+/183985 Run-TryBot: Bryan C. Mills TryBot-Result: Gobot Gobot Reviewed-by: Jay Conrod --- misc/cgo/errors/ptr_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/cgo/errors/ptr_test.go b/misc/cgo/errors/ptr_test.go index d1ef191bf54..42dfb92bd84 100644 --- a/misc/cgo/errors/ptr_test.go +++ b/misc/cgo/errors/ptr_test.go @@ -466,6 +466,9 @@ func buildPtrTests(t *testing.T) (dir, exe string) { if err := os.MkdirAll(src, 0777); err != nil { t.Fatal(err) } + if err := ioutil.WriteFile(filepath.Join(src, "go.mod"), []byte("module ptrtest"), 0666); err != nil { + t.Fatal(err) + } // Prepare two cgo inputs: one for standard cgo and one for //export cgo. // (The latter cannot have C definitions, only declarations.)