aboutsummaryrefslogtreecommitdiffstats
path: root/syz-agent
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2026-01-09 14:51:45 +0100
committerDmitry Vyukov <dvyukov@google.com>2026-01-09 14:03:52 +0000
commit4682573eed1810c6839cd6f4fb2737506e8b3390 (patch)
tree9617ded5792adce1b2ebb623bc2ce021545614e7 /syz-agent
parent7e57aa18589cb9718f06c40e974136761ab1cfa5 (diff)
syz-agent: make cache size configurable
It may be useful to use smaller than 1TB cache size for local test runs.
Diffstat (limited to 'syz-agent')
-rw-r--r--syz-agent/agent.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/syz-agent/agent.go b/syz-agent/agent.go
index a1d11445c..375990a16 100644
--- a/syz-agent/agent.go
+++ b/syz-agent/agent.go
@@ -42,6 +42,9 @@ type Config struct {
Image string `json:"image"`
Type string `json:"type"`
VM json.RawMessage `json:"vm"`
+ // Max workdir cache size (defaults to 1TB).
+ // The whole workdir may be slightly larger, since e.g. kernel checkout is not accounted here.
+ CacheSize uint64
// Use fixed base commit for patching jobs (for testing).
FixedBaseCommit string `json:"fixed_base_commit"`
// Use this LLM model (for testing, if empty use a default model).
@@ -66,6 +69,7 @@ func run(configFile string, exitOnUpgrade, autoUpdate bool) error {
cfg := &Config{
SyzkallerRepo: "https://github.com/google/syzkaller.git",
SyzkallerBranch: "master",
+ CacheSize: 1 << 40, // 1TB should be enough for everyone!
Model: aflow.DefaultModel,
}
if err := config.LoadFile(configFile, cfg); err != nil {
@@ -103,8 +107,7 @@ func run(configFile string, exitOnUpgrade, autoUpdate bool) error {
updater.UpdateOnStart(autoUpdate, updatePending, shutdownPending)
const workdir = "workdir"
- const cacheSize = 1 << 40 // 1TB should be enough for everyone!
- cache, err := aflow.NewCache(filepath.Join(workdir, "cache"), cacheSize)
+ cache, err := aflow.NewCache(filepath.Join(workdir, "cache"), cfg.CacheSize)
if err != nil {
return err
}