aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-execprog
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-04-08 13:37:24 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-04-08 13:37:24 +0200
commitbc77795d9014f9a92078988f72707e4c85037173 (patch)
tree0c1004b4c8e577b217c4ce18e4e580135ef839fb /tools/syz-execprog
parentd70ffd1a2b542498fa18cc470cc91441dc76f55b (diff)
tools/syz-execprog: reduce log level of some messages
Too much output by default.
Diffstat (limited to 'tools/syz-execprog')
-rw-r--r--tools/syz-execprog/execprog.go17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go
index 59bb33a21..b59a55682 100644
--- a/tools/syz-execprog/execprog.go
+++ b/tools/syz-execprog/execprog.go
@@ -157,19 +157,22 @@ func main() {
default:
}
if failed {
- fmt.Printf("BUG: executor-detected bug:\n%s", output)
+ Logf(0, "BUG: executor-detected bug:\n%s", output)
}
if config.Flags&ipc.FlagDebug != 0 || err != nil {
- fmt.Printf("result: failed=%v hanged=%v err=%v\n\n%s", failed, hanged, err, output)
+ Logf(0, "result: failed=%v hanged=%v err=%v\n\n%s",
+ failed, hanged, err, output)
}
if len(info) != 0 {
- fmt.Printf("RESULT: signal %v, coverage %v errno %v\n", len(info[0].Signal), len(info[0].Cover), info[0].Errno)
+ Logf(1, "RESULT: signal %v, coverage %v errno %v",
+ len(info[0].Signal), len(info[0].Cover), info[0].Errno)
} else {
- fmt.Printf("RESULT: no calls executed\n")
+ Logf(1, "RESULT: no calls executed")
}
if *flagCoverFile != "" {
for i, inf := range info {
- fmt.Printf("call #%v: signal %v, coverage %v\n", i, len(inf.Signal), len(inf.Cover))
+ Logf(0, "call #%v: signal %v, coverage %v",
+ i, len(inf.Signal), len(inf.Cover))
if len(inf.Cover) == 0 {
continue
}
@@ -203,11 +206,11 @@ func main() {
entry.P.MutateWithHints(i, comps, func(p *prog.Prog) {
ncandidates++
if *flagOutput == "stdout" {
- fmt.Printf("PROGRAM:\n%s\n", p.Serialize())
+ Logf(1, "PROGRAM:\n%s", p.Serialize())
}
})
}
- fmt.Printf("ncomps=%v ncandidates=%v\n", ncomps, ncandidates)
+ Logf(0, "ncomps=%v ncandidates=%v", ncomps, ncandidates)
}
return true
}() {