Skip to content

Commit

Permalink
syz-manager: refactor empty crash log errors
Browse files Browse the repository at this point in the history
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().
  • Loading branch information
a-nogikh committed Jul 17, 2024
1 parent e8048e9 commit 03114f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
4 changes: 1 addition & 3 deletions pkg/repro/repro.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions syz-manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,6 @@ func reportReproError(err error) {
}

switch err {
case repro.ErrNoPrograms:
// This is not extraordinary as programs are collected via SSH.
log.Logf(0, "repro failed: %v", err)
return
case repro.ErrNoVMs:
// This error is to be expected if we're shutting down.
if shutdown {
Expand Down

0 comments on commit 03114f5

Please sign in to comment.