diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-07-17 15:38:58 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-07-17 13:49:41 +0000 |
| commit | 03114f556abbd471f01113deebb05436acb62db0 (patch) | |
| tree | 20c358ff1f05efa67828d555e583877157fb8042 /pkg/repro | |
| parent | e8048e9c74182279be8992eced157419d4d9344f (diff) | |
syz-manager: refactor empty crash log errors
Now that we do not take the programs from the SSH-based logs, the error
does look surprising, so let's print it with log.Errorf().
Diffstat (limited to 'pkg/repro')
| -rw-r--r-- | pkg/repro/repro.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index 3b0c47e02..31958c8f7 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -66,8 +66,6 @@ type execInterface interface { *instance.RunResult, error) } -var ErrNoPrograms = errors.New("crash log does not contain any programs") - func Run(crashLog []byte, cfg *mgrconfig.Config, features flatrpc.Feature, reporter *report.Reporter, pool *dispatcher.Pool[*vm.Instance]) (*Result, *Stats, error) { exec := &poolWrapper{ @@ -87,7 +85,7 @@ func prepareCtx(crashLog []byte, cfg *mgrconfig.Config, features flatrpc.Feature exec execInterface) (*reproContext, error) { entries := cfg.Target.ParseLog(crashLog) if len(entries) == 0 { - return nil, ErrNoPrograms + return nil, fmt.Errorf("crash log (%d bytes) does not contain any programs", len(crashLog)) } crashStart := len(crashLog) crashTitle, crashType := "", crash.UnknownType |
