Skip to content

Commit

Permalink
cmd/go: enable fuzz testing for FreeBSD
Browse files Browse the repository at this point in the history
Add "freebsd" to GOOS for which sys.FuzzSupported() returns true
and add freebsd to the build tags to fuzz test source.

Fixes golang#46554
Change-Id: I5f695ecc8f09c0ab4279ced23b4715b788fcade0
Reviewed-on: https://go-review.googlesource.com/c/go/+/377855
Trust: Bryan Mills <bcmills@google.com>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
  • Loading branch information
ayang64 authored and jproberts committed Jun 21, 2022
1 parent 73502c6 commit ed9555a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cmd/internal/sys/supported.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func ASanSupported(goos, goarch string) bool {
// ('go test -fuzz=.').
func FuzzSupported(goos, goarch string) bool {
switch goos {
case "darwin", "linux", "windows":
case "darwin", "freebsd", "linux", "windows":
return true
default:
return false
Expand Down
2 changes: 1 addition & 1 deletion src/internal/fuzz/minimize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build darwin || linux || windows
//go:build darwin || freebsd || linux || windows

package fuzz

Expand Down
2 changes: 1 addition & 1 deletion src/internal/fuzz/sys_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build darwin || linux
//go:build darwin || freebsd || linux

package fuzz

Expand Down
2 changes: 1 addition & 1 deletion src/internal/fuzz/sys_unimplemented.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// If you update this constraint, also update cmd/internal/sys.FuzzSupported.
//
//go:build !darwin && !linux && !windows
//go:build !darwin && !freebsd && !linux && !windows

package fuzz

Expand Down

0 comments on commit ed9555a

Please sign in to comment.