Skip to content

Commit c81bd81

Browse files
committed
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
1 parent c7b2f64 commit c81bd81

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/internal/fuzz/counters_supported.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build (darwin || linux || windows || freebsd) && (amd64 || arm64)
5+
//go:build (darwin || linux || windows || freebsd || openbsd) && (amd64 || arm64)
66

77
package fuzz
88

src/internal/fuzz/counters_unsupported.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99
// If you update this constraint, also update internal/platform.FuzzInstrumeted.
1010
//
11-
//go:build !((darwin || linux || windows || freebsd) && (amd64 || arm64))
11+
//go:build !((darwin || linux || windows || freebsd || openbsd) && (amd64 || arm64))
1212

1313
package fuzz
1414

src/internal/fuzz/minimize_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build darwin || freebsd || linux || windows
5+
//go:build darwin || freebsd || linux || openbsd || windows
66

77
package fuzz
88

src/internal/fuzz/sys_posix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build darwin || freebsd || linux
5+
//go:build darwin || freebsd || linux || openbsd
66

77
package fuzz
88

src/internal/fuzz/sys_unimplemented.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// If you update this constraint, also update internal/platform.FuzzSupported.
66
//
7-
//go:build !darwin && !freebsd && !linux && !windows
7+
//go:build !darwin && !freebsd && !linux && !openbsd && !windows
88

99
package fuzz
1010

src/internal/platform/supported.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func ASanSupported(goos, goarch string) bool {
5050
// ('go test -fuzz=.').
5151
func FuzzSupported(goos, goarch string) bool {
5252
switch goos {
53-
case "darwin", "freebsd", "linux", "windows":
53+
case "darwin", "freebsd", "linux", "openbsd", "windows":
5454
return true
5555
default:
5656
return false

0 commit comments

Comments
 (0)