aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/csource_test.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2021-12-01 17:25:40 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2021-12-10 12:30:07 +0100
commit18f846ca807cfc6df9c3da3c0ab08251277dfefb (patch)
treee14f783b914409f21ae77a01a6b74ededaba6901 /pkg/csource/csource_test.go
parent52c8379f77b5f292e2d527c66dfe17a899381d20 (diff)
all: add the `rerun` call property
To be able to collide specific syscalls more precisely, we need to repeat the process many times. Introduce the `rerun` call property, which instructs `syz-executor` to repeat the call the specified number of times. The intended use is: call1() (rerun: 100, async) call2() (rerun: 100) For now, assign rerun values randomly to consecutive pairs of calls, where the first one is async.
Diffstat (limited to 'pkg/csource/csource_test.go')
-rw-r--r--pkg/csource/csource_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go
index 885d75f67..fc3b21573 100644
--- a/pkg/csource/csource_test.go
+++ b/pkg/csource/csource_test.go
@@ -70,13 +70,16 @@ func testTarget(t *testing.T, target *prog.Target, full bool) {
p.Calls = append(p.Calls, minimized.Calls...)
opts = allOptionsPermutations(target.OS)
}
- // Test fault injection and async call generation as well.
+ // Test various call properties.
if len(p.Calls) > 0 {
p.Calls[0].Props.FailNth = 1
}
if len(p.Calls) > 1 {
p.Calls[1].Props.Async = true
}
+ if len(p.Calls) > 2 {
+ p.Calls[2].Props.Rerun = 4
+ }
for opti, opts := range opts {
if testing.Short() && opts.HandleSegv {
// HandleSegv can radically increase compilation time/memory consumption on large programs.