aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorGrigory Bazilevich <g.bazilevich@ispras.ru>2025-10-23 23:27:33 +0300
committerGrigory Bazilevich <g.bazilevich@ispras.ru>2026-03-12 12:15:10 +0300
commit3b71af44bb75821dbdc8c7e80a4d09bdb6bd7285 (patch)
tree659943785723a1b64f604ac3c6c41c586a35b941 /pkg
parent621210a923036a3ef769cadea6ebf957d7675b1c (diff)
pkg/mgrconfig: Make slowdown configurable
Signed-off-by: Denis Efremov <efremov@ispras.ru>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/mgrconfig/config.go4
-rw-r--r--pkg/mgrconfig/load.go6
2 files changed, 10 insertions, 0 deletions
diff --git a/pkg/mgrconfig/config.go b/pkg/mgrconfig/config.go
index db6e10ba8..0e7c17243 100644
--- a/pkg/mgrconfig/config.go
+++ b/pkg/mgrconfig/config.go
@@ -109,6 +109,10 @@ type Config struct {
// long as it preserves `bin` dir structure)
Syzkaller string `json:"syzkaller"`
+ // Slowdown factor: 0 for auto-detection.
+ // 0 is the default value.
+ Slowdown int `json:"slowdown"`
+
// Number of parallel test processes inside of each VM.
// Allowed values are 1-32, recommended range is ~4-8, default value is 6.
// It should be chosen to saturate CPU inside of the VM and maximize number of test executions,
diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go
index 86064dc38..b0487d87e 100644
--- a/pkg/mgrconfig/load.go
+++ b/pkg/mgrconfig/load.go
@@ -122,6 +122,7 @@ func DefaultValues() *Config {
RPC: ":0",
MaxCrashLogs: 100,
Procs: 6,
+ Slowdown: 0,
PreserveCorpus: true,
RunFsck: true,
Experimental: Experimental{
@@ -284,6 +285,11 @@ func (cfg *Config) initTimeouts() {
// Note: the name check is a hack.
slowdown = 10
}
+
+ if cfg.Slowdown != 0 {
+ slowdown = cfg.Slowdown
+ }
+
// Note: we could also consider heavy debug tools (KASAN/KMSAN/KCSAN/KMEMLEAK) if necessary.
cfg.Timeouts = cfg.SysTarget.Timeouts(slowdown)
}