From a13ba2b663b7d2761d9ff6cf1165fa4f2f64aa2c Mon Sep 17 00:00:00 2001 From: Ethan Graham Date: Tue, 16 Sep 2025 09:17:04 +0000 Subject: pkg/fuzzer: use a smaller number of recommended calls for KFuzzTest Introduce a KFuzzTest mode for the fuzzer so that a smaller number of recommended calls can be used if we are fuzzing KFuzzTest targets. Signed-off-by: Ethan Graham --- pkg/fuzzer/fuzzer.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/fuzzer/fuzzer.go') diff --git a/pkg/fuzzer/fuzzer.go b/pkg/fuzzer/fuzzer.go index 0c0119e71..fdfe95518 100644 --- a/pkg/fuzzer/fuzzer.go +++ b/pkg/fuzzer/fuzzer.go @@ -72,6 +72,13 @@ func NewFuzzer(ctx context.Context, cfg *Config, rnd *rand.Rand, return f } +func (fuzzer *Fuzzer) RecommendedCalls() int { + if fuzzer.Config.ModeKFuzzTest { + return prog.RecommendedCallsKFuzzTest + } + return prog.RecommendedCalls +} + type execQueues struct { triageCandidateQueue *queue.DynamicOrderer candidateQueue *queue.PlainQueue @@ -214,6 +221,7 @@ type Config struct { FetchRawCover bool NewInputFilter func(call string) bool PatchTest bool + ModeKFuzzTest bool } func (fuzzer *Fuzzer) triageProgCall(p *prog.Prog, info *flatrpc.CallInfo, call int, triage *map[int]*triageCall) { -- cgit mrf-deployment