diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-12-17 16:55:42 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-17 19:09:03 +0100 |
| commit | b38da77e00c6c2fb3424224657e9f665e519ea2d (patch) | |
| tree | e4287fc16c85a0c8e499121303a8f9dd00cfc7b2 /tools/syz-bisect | |
| parent | 61adbb167eba0cc237dde8c0d9edee68ddb78623 (diff) | |
pkg/bisect: check existence of input files
It's better to fail early then to wait for kernel build.
Update #501
Diffstat (limited to 'tools/syz-bisect')
| -rw-r--r-- | tools/syz-bisect/bisect.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/syz-bisect/bisect.go b/tools/syz-bisect/bisect.go index ec68f4b95..eaae1f9e7 100644 --- a/tools/syz-bisect/bisect.go +++ b/tools/syz-bisect/bisect.go @@ -78,7 +78,10 @@ func main() { loadFile("kernel.config", &cfg.Kernel.Config) loadFile("repro.syz", &cfg.Repro.Syz) loadFile("repro.opts", &cfg.Repro.Opts) - bisect.Run(cfg) + if _, err := bisect.Run(cfg); err != nil { + fmt.Fprintf(os.Stderr, "bisection failed: %v\n", err) + os.Exit(1) + } } func loadString(file string, dst *string) { |
