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/encoding_test.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/encoding_test.go')
| -rw-r--r-- | prog/encoding_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/prog/encoding_test.go b/prog/encoding_test.go index d7171248f..11e71867f 100644 --- a/prog/encoding_test.go +++ b/prog/encoding_test.go @@ -327,6 +327,10 @@ func TestDeserialize(t *testing.T) { Out: `test$opt2(0x0) (fail_nth: 1)`, StrictErr: `unknown call property: non_existing_prop`, }, + { + In: `test$opt2(0x0) (fail_nth: 0)`, + Out: `test$opt2(0x0)`, + }, }) } @@ -409,11 +413,11 @@ func TestSerializeCallProps(t *testing.T) { tests := []SerializeCallPropsTest{ { "serialize0(0x0)\n", - []CallProps{DefaultCallProps()}, + []CallProps{{}}, }, { "serialize0(0x0) ()\n", - []CallProps{DefaultCallProps()}, + []CallProps{{}}, }, { "serialize0(0x0) (fail_nth: 5)\n", |
