]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: enable fuzz testing on OpenBSD
authorMaciej Żok <maciek.zok+github@gmail.com>
Tue, 30 May 2023 18:29:05 +0000 (18:29 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 14 Mar 2025 22:09:04 +0000 (15:09 -0700)
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>

src/internal/fuzz/counters_supported.go
src/internal/fuzz/counters_unsupported.go
src/internal/fuzz/minimize_test.go
src/internal/fuzz/sys_posix.go
src/internal/fuzz/sys_unimplemented.go
src/internal/platform/supported.go

index 79e27d27e1af287ef57bcd6bd52a8a6d1fabd509..a71d98d2663d0adfd34358d8f4bf9a304a5a0d6c 100644 (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
 
index 287bb4bd3ceb3aeb9374c299ead615ada111d005..156919ec2e1be3b500929f3b335fdd3ee997d47f 100644 (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
 
index 2db26338967e27c77899d0fde55840ed4fc6af95..e7e23e5a052cc4f51952a92ea9ec2def15fcf43a 100644 (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
 
index fec6054f671cc8e83039cfa694f0d52f88b89c79..40d3771c2ac0e6dd955ce537ee049d44441d1c63 100644 (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
 
index 8687c1f963e1ba7136337f55bf0e6704757876d1..30766ba525f2c8d508b2b19aeb7399e93f02c2f9 100644 (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
 
index 702a255e4cd928528053de030da15b756cf66c53..ad8dc930860d90d79928e22b2e524e675ad8e7e6 100644 (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