diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-05-21 21:13:39 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-05-27 07:21:25 +0000 |
| commit | 282e82b3010e362d6160ad2b137c13c74fc3fd12 (patch) | |
| tree | bfc205a0ea4b728deb98b865fa529d8e61c4fbd9 /pkg/repro/repro.go | |
| parent | a10a183e260f0ea1a0c37e84ca5c60f28c13e3fd (diff) | |
pkg/instance: use execprog to do basic instance testing
When we accept new kernels for fuzzing we need more extensive testing,
but syz-ci switched to using syz-manager for this purpose.
Now instance testing is used only for bisection and patch testing,
which does not need such extensive image testing (it may even harm).
So just run a simple program as a testing.
It also uses the same features as the target reproducer,
so e.g. if the reproducer does not use wifi, we won't test it,
which reduces changes of unrelated kernel bugs.
Diffstat (limited to 'pkg/repro/repro.go')
| -rw-r--r-- | pkg/repro/repro.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index f8148a463..68d67f11b 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -69,7 +69,8 @@ type context struct { type execInterface interface { Close() RunCProg(p *prog.Prog, duration time.Duration, opts csource.Options) (*instance.RunResult, error) - RunSyzProg(syzProg []byte, duration time.Duration, opts csource.Options) (*instance.RunResult, error) + RunSyzProg(syzProg []byte, duration time.Duration, opts csource.Options, exitCondition vm.ExitCondition) ( + *instance.RunResult, error) } var ErrNoPrograms = errors.New("crash log does not contain any programs") @@ -604,7 +605,7 @@ func (ctx *context) testProgs(entries []*prog.LogEntry, duration time.Duration, ctx.reproLogf(2, "testing program (duration=%v, %+v): %s", duration, opts, program) ctx.reproLogf(3, "detailed listing:\n%s", pstr) return ctx.testWithInstance(func(exec execInterface) (*instance.RunResult, error) { - return exec.RunSyzProg(pstr, duration, opts) + return exec.RunSyzProg(pstr, duration, opts, instance.SyzExitConditions) }) } |
