From 1c202847db0380015a8920bfd21375c2d9f28ddb Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 3 Sep 2021 16:20:07 +0000 Subject: 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. --- prog/prog.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'prog/prog.go') 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), } } -- cgit mrf-deployment