LittleDemon WebShell


Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
Path : /opt/golang/1.22.0/src/cmd/go/testdata/script/
File Upload :
Command :
Current File : //opt/golang/1.22.0/src/cmd/go/testdata/script/test_fuzz_cov.txt

# Test that coverage instrumentation is working. Without the instrumentation
# it is _extremely_ unlikely that the fuzzer would produce this particular
# input in any reasonable amount of time.

[short] skip
[!fuzz-instrumented] skip
env GOCACHE=$WORK/cache

# TODO(#51484): enabled debugging info to help diagnose a deadlock in the fuzzer
env GODEBUG=fuzzdebug=1
! go test -fuzz=FuzzCov -v
! stderr 'cov instrumentation working'

-- go.mod --
module test

-- cov_test.go --
package cov

import "testing"

func FuzzCov(f *testing.F) {
	f.Fuzz(func(t *testing.T, b []byte) {
		if len(b) == 8 &&
			b[0] == 'h' &&
			b[1] == 'e' &&
			b[2] == 'l' &&
			b[3] == 'l' &&
			b[4] == 'o' &&
			b[5] == ' ' &&
			b[6] == ':' &&
			b[7] == ')' {
			panic("cov instrumentation working")
		}
	})
}

LittleDemon - FACEBOOK
[ KELUAR ]