mirror of
https://github.com/golang/go.git
synced 2025-10-19 11:03:18 +00:00
cmd/cgo/internal/testsanitizers: skip asan tests when FIPS140 mode is on
Executing "GODEBUG=fips140=on go test -run TestASAN ./cmd/cgo/internal/testsanitizers" fails because FIPS 140 mode is incompatible with ASAN. Change-Id: I1a489f3398bbabf597fe7ffc0982c86c3b86e07e Reviewed-on: https://go-review.googlesource.com/c/go/+/685495 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Quim Muntal <quimmuntal@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
15d9fe43d6
commit
b325151453
1 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,7 @@ package sanitizers_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"crypto/fips140"
|
||||||
"fmt"
|
"fmt"
|
||||||
"internal/platform"
|
"internal/platform"
|
||||||
"internal/testenv"
|
"internal/testenv"
|
||||||
|
@ -157,6 +158,10 @@ func mustHaveASAN(t *testing.T) *config {
|
||||||
t.Skipf("skipping on %s/%s; -asan option is not supported.", goos, goarch)
|
t.Skipf("skipping on %s/%s; -asan option is not supported.", goos, goarch)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if fips140.Enabled() {
|
||||||
|
t.Skipf("skipping with FIPS 140 mode; -asan option is not supported.")
|
||||||
|
}
|
||||||
|
|
||||||
// The current implementation is only compatible with the ASan library from version
|
// The current implementation is only compatible with the ASan library from version
|
||||||
// v7 to v9 (See the description in src/runtime/asan/asan.go). Therefore, using the
|
// v7 to v9 (See the description in src/runtime/asan/asan.go). Therefore, using the
|
||||||
// -asan option must use a compatible version of ASan library, which requires that
|
// -asan option must use a compatible version of ASan library, which requires that
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue