diff options
| -rw-r--r-- | dashboard/app/kcidb.go | 5 | ||||
| -rw-r--r-- | pkg/csource/options.go | 4 | ||||
| -rw-r--r-- | pkg/symbolizer/addr2line.go | 1 | ||||
| -rw-r--r-- | syz-ci/jobs_test.go | 3 | ||||
| -rw-r--r-- | vm/proxyapp/proxyappclient.go | 2 |
5 files changed, 9 insertions, 6 deletions
diff --git a/dashboard/app/kcidb.go b/dashboard/app/kcidb.go index 7203c6dfa..f2cfeaacb 100644 --- a/dashboard/app/kcidb.go +++ b/dashboard/app/kcidb.go @@ -69,7 +69,10 @@ func publishKcidbBug(c context.Context, client *kcidb.Client, bug *Bug, bugKey * if err != nil { return false, err } - publish := !(rep.KernelCommit == "" || len(rep.KernelConfig) == 0) + // publish == false happens only for syzkaller build/test errors. + // But if this ever happens for a kernel bug, then we also don't want to publish such bugs + // with missing critical info. + publish := rep.KernelCommit != "" && len(rep.KernelConfig) != 0 if publish { if err := client.Publish(rep); err != nil { diff --git a/pkg/csource/options.go b/pkg/csource/options.go index 02e39980a..74d4a587a 100644 --- a/pkg/csource/options.go +++ b/pkg/csource/options.go @@ -125,11 +125,11 @@ func (opts Options) checkLinuxOnly(OS string) error { if OS == targets.Linux { return nil } - if opts.NetInjection && (OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD) { + if opts.NetInjection && OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD { return fmt.Errorf("option NetInjection is not supported on %v", OS) } if opts.Sandbox == sandboxNamespace || - (opts.Sandbox == sandboxSetuid && (OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD)) || + (opts.Sandbox == sandboxSetuid && OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD) || opts.Sandbox == sandboxAndroid { return fmt.Errorf("option Sandbox=%v is not supported on %v", opts.Sandbox, OS) } diff --git a/pkg/symbolizer/addr2line.go b/pkg/symbolizer/addr2line.go index 35cbfbe98..0cef4847b 100644 --- a/pkg/symbolizer/addr2line.go +++ b/pkg/symbolizer/addr2line.go @@ -137,7 +137,6 @@ func parse(interner *Interner, s *bufio.Scanner) ([]Frame, error) { } var frames []Frame for s.Scan() { - ln := s.Text() if len(ln) > 3 && ln[0] == '0' && ln[1] == 'x' { break diff --git a/syz-ci/jobs_test.go b/syz-ci/jobs_test.go index 547fd96e2..d00632197 100644 --- a/syz-ci/jobs_test.go +++ b/syz-ci/jobs_test.go @@ -4,6 +4,7 @@ package main import ( + "bytes" "errors" "fmt" "testing" @@ -125,7 +126,7 @@ func TestAggregateTestResults(t *testing.T) { if rep != nil { gotOutput = rep.rawOutput } - if fmt.Sprint(string(test.rawOut)) != fmt.Sprint(string(gotOutput)) { + if !bytes.Equal(test.rawOut, gotOutput) { t.Errorf("test #%v: got raw out: %q, want: %q", i, gotOutput, test.rawOut) } } diff --git a/vm/proxyapp/proxyappclient.go b/vm/proxyapp/proxyappclient.go index cbd731550..dce7b623e 100644 --- a/vm/proxyapp/proxyappclient.go +++ b/vm/proxyapp/proxyappclient.go @@ -591,7 +591,7 @@ type stdInOutCloser struct { func clientErrorf(writer io.Writer) func(fmt string, s ...interface{}) { return func(f string, s ...interface{}) { - fmt.Fprintf(writer, f, s) + fmt.Fprintf(writer, f, s...) writer.Write([]byte("\nSYZFAIL: proxy app plugin error\n")) } } |
