]> Cypherpunks repositories - gostls13.git/commit
runtime: pass through -asan/-msan/-race to testprog tests
authorMichael Pratt <mpratt@google.com>
Wed, 22 Jan 2025 22:18:19 +0000 (17:18 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 19 May 2025 18:00:01 +0000 (11:00 -0700)
commit2c929d6f4c8fcd1021dc3cd57b2eedff5ae9a592
treebd5dc12ab00823fa1f4450eb838cf0eb4d2abfb8
parent5afada035ced1f89267d3177a9fb75fab4df81ff
runtime: pass through -asan/-msan/-race to testprog tests

The tests using testprog / testprogcgo are currently not covered on the
asan/msan/race builders because they don't build testprog with the
sanitizer flag.

Explicitly pass the flag if the test itself is built with the sanitizer.

There were a few tests that explicitly passed -race (even on non-race
builders). These tests will now only run on race builders.

For #71395.

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-asan-clang15,gotip-linux-amd64-msan-clang15,gotip-linux-amd64-race
Change-Id: I6a6a636ce8271246316a80d426c0e4e2f6ab99c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/643897
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
16 files changed:
src/cmd/link/internal/ld/dwarf_test.go
src/cmd/link/internal/ld/elf_test.go
src/cmd/link/internal/ld/ld_test.go
src/cmd/link/internal/ld/macho_test.go
src/cmd/link/link_test.go
src/cmd/nm/nm_cgo_test.go
src/cmd/pack/pack_test.go
src/internal/testenv/testenv.go
src/os/exec/exec_test.go
src/runtime/crash_cgo_test.go
src/runtime/crash_test.go
src/runtime/ehooks_test.go
src/runtime/gc_test.go
src/runtime/stack_test.go
src/runtime/testdata/testprog/lockosthread_linux.go
src/runtime/time_test.go