aboutsummaryrefslogtreecommitdiffstats
path: root/prog
diff options
context:
space:
mode:
authorEthan Graham <ethangraham@google.com>2025-09-16 09:17:04 +0000
committerAleksandr Nogikh <nogikh@google.com>2025-09-22 09:11:54 +0000
commita13ba2b663b7d2761d9ff6cf1165fa4f2f64aa2c (patch)
treefcc71568c619712751a8456048797982333a4fa7 /prog
parent6feac83014c7863b431feaca50d89e1abbf2f054 (diff)
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 <ethangraham@google.com>
Diffstat (limited to 'prog')
-rw-r--r--prog/rand.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/prog/rand.go b/prog/rand.go
index b06cc1a90..d54ef0dfe 100644
--- a/prog/rand.go
+++ b/prog/rand.go
@@ -21,6 +21,10 @@ const (
// "Recommended" max number of calls in programs.
// If we receive longer programs from hub/corpus we discard them.
MaxCalls = 40
+ // "Recommended" number of calls in KFuzzTest mode. These targets test the behavior
+ // of internal kernel functions rather than system behavior, and for this reason
+ // it is more sensible to generate a smaller number of calls instead of long chains.
+ RecommendedCallsKFuzzTest = 5
)
type randGen struct {