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:
f697a3c0f2dc36cc3c96c0336281c5e2440f7a1a
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>
// 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
//
// 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
// 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
// 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
// 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
// ('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