diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2021-09-03 16:20:07 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2021-09-22 15:40:02 +0200 |
| commit | 1c202847db0380015a8920bfd21375c2d9f28ddb (patch) | |
| tree | 6693da3a936398a9ac6678842ac181c5f0e3e429 /prog/prog.go | |
| parent | a7ce77be27d8e3728b97122a005bc5b23298cfc3 (diff) | |
all: refactor fault injection into call props
Now that call properties mechanism is implemented, we can refactor
fault injection.
Unfortunately, it is impossible to remove all traces of the previous apprach.
In reprolist and while performing syz-ci jobs, syzkaller still needs to
parse the old format.
Remove the old prog options-based approach whenever possible and replace
it with the use of call properties.
Diffstat (limited to 'prog/prog.go')
| -rw-r--r-- | prog/prog.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/prog/prog.go b/prog/prog.go index 6ead4d47e..068198ffe 100644 --- a/prog/prog.go +++ b/prog/prog.go @@ -22,12 +22,6 @@ type CallProps struct { FailNth int `key:"fail_nth"` } -func DefaultCallProps() CallProps { - return CallProps{ - FailNth: -1, - } -} - type Call struct { Meta *Syscall Args []Arg @@ -38,10 +32,9 @@ type Call struct { func MakeCall(meta *Syscall, args []Arg) *Call { return &Call{ - Meta: meta, - Args: args, - Ret: MakeReturnArg(meta.Ret), - Props: DefaultCallProps(), + Meta: meta, + Args: args, + Ret: MakeReturnArg(meta.Ret), } } |
