diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-04-10 18:53:08 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-04-10 17:06:49 +0000 |
| commit | d77f428f8d1a224f7aa8085a5ce10083267b0ae6 (patch) | |
| tree | df5f584e18004af8396996fe7395067f62713de7 | |
| parent | 1ef3ab4dee83617d4f9652edc2ddf2e0e8988c9a (diff) | |
tools/syz-benchcmp: don't start browser if -out is set
The -out option is used by syz-testbed, which only needs the output.
| -rw-r--r-- | tools/syz-benchcmp/benchcmp.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/syz-benchcmp/benchcmp.go b/tools/syz-benchcmp/benchcmp.go index 646a93614..81bd0b900 100644 --- a/tools/syz-benchcmp/benchcmp.go +++ b/tools/syz-benchcmp/benchcmp.go @@ -23,7 +23,7 @@ import ( var ( flagAll = flag.Bool("all", false, "draw graphs for all variables") - flagOut = flag.String("out", "", "file to save graphs to; if empty, a random name will be generated") + flagOut = flag.String("out", "", "save the graph into the file instead of starting the browser") flagOver = flag.String("over", "fuzzing", "the variable that lies on the X axis") flagSkip = flag.Int("skip", -30, "skip that many seconds after start (skip first 20% by default)") ) @@ -241,8 +241,10 @@ func display(graphs []*Graph) { tool.Failf("failed to execute template: %v", err) } outf.Close() - if err := exec.Command("xdg-open", outf.Name()).Start(); err != nil { - tool.Failf("failed to start browser: %v", err) + if *flagOut == "" { + if err := exec.Command("xdg-open", outf.Name()).Start(); err != nil { + tool.Failf("failed to start browser: %v", err) + } } } |
