diff options
| author | Jouni Hogander <jouni.hogander@unikie.com> | 2020-04-26 07:44:03 +0300 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-04-29 11:20:26 +0200 |
| commit | bc0712ac2b409dba2045d23fbbefe46cf7ca9b8e (patch) | |
| tree | 87efcd3600b10f317e53e9151c432d3c4fe93b63 /tools/syz-bisect | |
| parent | 2fdc5098e9519e0242206a34bf0aafb8721ad469 (diff) | |
pkg/instance: Use syz or c source file when testing
Currenlty only syz file is taken into account when testing.
Use also c source file if available. Still use syz as a "main"
reproducer.
Diffstat (limited to 'tools/syz-bisect')
| -rw-r--r-- | tools/syz-bisect/bisect.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/syz-bisect/bisect.go b/tools/syz-bisect/bisect.go index fa453c08f..741a3433d 100644 --- a/tools/syz-bisect/bisect.go +++ b/tools/syz-bisect/bisect.go @@ -101,7 +101,12 @@ func main() { loadString("syzkaller.commit", &cfg.Syzkaller.Commit) loadString("kernel.commit", &cfg.Kernel.Commit) loadFile("kernel.config", &cfg.Kernel.Config) - loadFile("repro.syz", &cfg.Repro.Syz) + if _, err := os.Stat("repro.syz"); err == nil { + loadFile("repro.syz", &cfg.Repro.Syz) + } + if _, err := os.Stat("repro.c"); err == nil { + loadFile("repro.c", &cfg.Repro.C) + } loadFile("repro.opts", &cfg.Repro.Opts) if _, err := bisect.Run(cfg); err != nil { fmt.Fprintf(os.Stderr, "bisection failed: %v\n", err) |
