diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-11-25 09:17:50 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-12-28 14:22:41 +0100 |
| commit | cbd0445ec3b0b184db66966d8a47e6b37d13692e (patch) | |
| tree | 14ed47723c325ef1b388e4e732a70c0fed4fa101 /pkg/csource/options_test.go | |
| parent | 2242f77fdc5a6c50bd8fa1021d2abc8b83e09e8d (diff) | |
all: make timeouts configurable
Add sys/targets.Timeouts struct that parametrizes timeouts throughout the system.
The struct allows to control syscall/program/no output timeouts for OS/arch/VM/etc.
See comment on the struct for more details.
Diffstat (limited to 'pkg/csource/options_test.go')
| -rw-r--r-- | pkg/csource/options_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/csource/options_test.go b/pkg/csource/options_test.go index b9594e341..cd247fada 100644 --- a/pkg/csource/options_test.go +++ b/pkg/csource/options_test.go @@ -37,6 +37,7 @@ func TestParseOptionsCanned(t *testing.T) { Collide: true, Repeat: true, Procs: 10, + Slowdown: 1, Sandbox: "namespace", Fault: true, FaultCall: 1, @@ -59,6 +60,7 @@ func TestParseOptionsCanned(t *testing.T) { Collide: true, Repeat: true, Procs: 10, + Slowdown: 1, Sandbox: "android", Fault: true, FaultCall: 1, @@ -78,6 +80,7 @@ func TestParseOptionsCanned(t *testing.T) { Collide: true, Repeat: true, Procs: 1, + Slowdown: 1, Sandbox: "none", Fault: false, FaultCall: -1, @@ -95,6 +98,7 @@ func TestParseOptionsCanned(t *testing.T) { Collide: true, Repeat: true, Procs: 1, + Slowdown: 1, Sandbox: "", Fault: false, FaultCall: -1, @@ -112,6 +116,7 @@ func TestParseOptionsCanned(t *testing.T) { Collide: true, Repeat: true, Procs: 1, + Slowdown: 1, Sandbox: "namespace", Fault: false, FaultCall: -1, @@ -147,6 +152,7 @@ func allOptionsSingle(OS string) []Options { Repeat: true, Sandbox: "none", UseTmpDir: true, + Slowdown: 1, } opts = append(opts, enumerateField(OS, opt, i)...) } @@ -200,6 +206,11 @@ func enumerateField(OS string, opt Options, field int) []Options { fld.SetInt(times) opts = append(opts, opt) } + } else if fldName == "Slowdown" { + for _, val := range []int64{1, 10} { + fld.SetInt(val) + opts = append(opts, opt) + } } else if fldName == "FaultCall" { opts = append(opts, opt) } else if fldName == "FaultNth" { |
