cmd/go: enable fuzz testing on OpenBSD

This change provides support for -fuzz flag on OpenBSD. According to #46554 the flag was unsupported on some OSes due to lack of proper testing.

Fixes: #60491

Change-Id: I49835131d3ee23f6482583b518b9c5c224fc4efe
GitHub-Last-Rev: f697a3c0f2
GitHub-Pull-Request: golang/go#60520
Reviewed-on: https://go-review.googlesource.com/c/go/+/499335
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: qiu laidongfeng2 <2645477756@qq.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Maciej Żok 2023-05-30 18:29:05 +00:00 committed by Gopher Robot
parent 5bb73e6504
commit 580b6ee646
6 changed files with 6 additions and 6 deletions

View File

@ -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 || freebsd) && (amd64 || arm64)
//go:build (darwin || linux || windows || freebsd || openbsd) && (amd64 || arm64)
package fuzz

View File

@ -8,7 +8,7 @@
//
// If you update this constraint, also update internal/platform.FuzzInstrumented.
//
//go:build !((darwin || linux || windows || freebsd) && (amd64 || arm64))
//go:build !((darwin || linux || windows || freebsd || openbsd) && (amd64 || arm64))
package fuzz

View File

@ -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 || freebsd || linux || windows
//go:build darwin || freebsd || linux || openbsd || windows
package fuzz

View File

@ -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 || freebsd || linux
//go:build darwin || freebsd || linux || openbsd
package fuzz

View File

@ -4,7 +4,7 @@
// If you update this constraint, also update internal/platform.FuzzSupported.
//
//go:build !darwin && !freebsd && !linux && !windows
//go:build !darwin && !freebsd && !linux && !openbsd && !windows
package fuzz

View File

@ -61,7 +61,7 @@ func ASanSupported(goos, goarch string) bool {
// ('go test -fuzz=.').
func FuzzSupported(goos, goarch string) bool {
switch goos {
case "darwin", "freebsd", "linux", "windows":
case "darwin", "freebsd", "linux", "openbsd", "windows":
return true
default:
return false