Text file src/cmd/go/testdata/script/test_fuzz_cgo.txt
1 [!fuzz] skip 2 [!cgo] skip 3 [short] skip 4 env GOCACHE=$WORK/cache 5 6 # Test that fuzzing works with cgo (issue 65169) 7 8 go test -fuzz=. -fuzztime=1x 9 stdout ok 10 ! stdout FAIL 11 12 -- go.mod -- 13 module example.com/p 14 15 go 1.20 16 -- c.go -- 17 package p 18 19 import "C" 20 -- c_test.go -- 21 package p 22 23 import "testing" 24 25 func Fuzz(f *testing.F) { 26 f.Add(0) 27 f.Fuzz(func(t *testing.T, x int) {}) 28 } 29