diff options
author | Dmitri Goutnik <dgoutnik@gmail.com> | 2022-06-08 10:56:36 -0500 |
---|---|---|
committer | Dmitri Goutnik <dgoutnik@gmail.com> | 2022-10-14 12:48:50 +0000 |
commit | a4b4717f23334547f40f90f1457f3dc086259fa3 (patch) | |
tree | 309484968f7d545afbf2cbf9010f239688daea3d /misc/cgo | |
parent | e56c93f07b445d1c123b1c46483db2d214af8cc3 (diff) | |
download | go-a4b4717f23334547f40f90f1457f3dc086259fa3.tar.gz go-a4b4717f23334547f40f90f1457f3dc086259fa3.zip |
cmd/dist, misc/cgo/testsanitizers: enable msan tests on freebsd/amd64
Adjust os/arch checks to enable msan tests on freebsd/amd64.
R=go1.20
For #53298
Change-Id: I3d0f5259db73d526d006a12de5ba6284528cf819
Reviewed-on: https://go-review.googlesource.com/c/go/+/411276
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'misc/cgo')
-rw-r--r-- | misc/cgo/testsanitizers/cc_test.go | 2 | ||||
-rw-r--r-- | misc/cgo/testsanitizers/msan_test.go | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/misc/cgo/testsanitizers/cc_test.go b/misc/cgo/testsanitizers/cc_test.go index 3c67448dcd..af85f99325 100644 --- a/misc/cgo/testsanitizers/cc_test.go +++ b/misc/cgo/testsanitizers/cc_test.go @@ -540,6 +540,8 @@ func mSanSupported(goos, goarch string) bool { switch goos { case "linux": return goarch == "amd64" || goarch == "arm64" + case "freebsd": + return goarch == "amd64" default: return false } diff --git a/misc/cgo/testsanitizers/msan_test.go b/misc/cgo/testsanitizers/msan_test.go index 4043e3ecf9..96397e0a87 100644 --- a/misc/cgo/testsanitizers/msan_test.go +++ b/misc/cgo/testsanitizers/msan_test.go @@ -24,7 +24,11 @@ func TestMSAN(t *testing.T) { } t.Parallel() - requireOvercommit(t) + // Overcommit is enabled by default on FreeBSD (vm.overcommit=0, see tuning(7)). + // Do not skip tests with stricter overcommit settings unless testing shows that FreeBSD has similar issues. + if goos == "linux" { + requireOvercommit(t) + } config := configure("memory") config.skipIfCSanitizerBroken(t) |