]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo/internal/testsanitizers: build on all platforms
authorAustin Clements <austin@google.com>
Fri, 12 May 2023 19:19:23 +0000 (15:19 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 12 May 2023 19:43:56 +0000 (19:43 +0000)
commit57009d45040e92124fb4aefd59825d3525fd7d3a
treec1a1ca840655b7de37e2e4632002bbbbd8b212ff
parentf2fcea5009d06d14b9869879f897c4ffb11cf953
cmd/cgo/internal/testsanitizers: build on all platforms

This test package uses the Pdeathsig field of syscall.SysProcAttr,
which is only available on a few platforms. Currently, dist test
checks for compatible platforms and only registers it as part of
all.bash on platforms where it can build. But this doesn't help if
you're just trying to type check everything in cmd.

Make this package pass type checking by moving the condition from dist
into build tags on the test package itself.

For #60164.
Updates #37486.

Change-Id: I58b12d547c323cec895320baa5fca1b82e99d1b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/494658
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
src/cmd/cgo/internal/testsanitizers/asan_test.go
src/cmd/cgo/internal/testsanitizers/cc_test.go
src/cmd/cgo/internal/testsanitizers/cshared_test.go
src/cmd/cgo/internal/testsanitizers/empty_test.go [new file with mode: 0644]
src/cmd/cgo/internal/testsanitizers/libfuzzer_test.go
src/cmd/cgo/internal/testsanitizers/msan_test.go
src/cmd/cgo/internal/testsanitizers/tsan_test.go
src/cmd/dist/test.go