Skip to content

Commit

Permalink
cmd/cgo/internal/testsanitizers: check for go build and cgo in fuzzer…
Browse files Browse the repository at this point in the history
… and msan tests

Make sure the platform we are running the tests on can compile programs
and has cgo support in order to run the fuzzer and msan tests. This is the
same approach used by the asan tests, which share the same requirements.

Fixes #64626

Change-Id: I7c0b912dabdd1b7d7d44437e4ade5e5994994796
GitHub-Last-Rev: 9fae697
GitHub-Pull-Request: #64640
Reviewed-on: https://go-review.googlesource.com/c/go/+/548715
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Bryan Mills <[email protected]>
Reviewed-by: Matthew Dempsky <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
  • Loading branch information
mauri870 authored and gopherbot committed Dec 12, 2023
1 parent 0ac1e3b commit c2079de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cmd/cgo/internal/testsanitizers/libfuzzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
package sanitizers_test

import (
"internal/testenv"
"strings"
"testing"
)

func TestLibFuzzer(t *testing.T) {
testenv.MustHaveGoBuild(t)
testenv.MustHaveCGO(t)
goos, err := goEnv("GOOS")
if err != nil {
t.Fatal(err)
Expand Down
3 changes: 3 additions & 0 deletions src/cmd/cgo/internal/testsanitizers/msan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ package sanitizers_test

import (
"internal/platform"
"internal/testenv"
"strings"
"testing"
)

func TestMSAN(t *testing.T) {
testenv.MustHaveGoBuild(t)
testenv.MustHaveCGO(t)
goos, err := goEnv("GOOS")
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit c2079de

Please sign in to comment.