aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-benchcmp
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-04-10 18:53:08 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-04-10 17:06:49 +0000
commitd77f428f8d1a224f7aa8085a5ce10083267b0ae6 (patch)
treedf5f584e18004af8396996fe7395067f62713de7 /tools/syz-benchcmp
parent1ef3ab4dee83617d4f9652edc2ddf2e0e8988c9a (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.
Diffstat (limited to 'tools/syz-benchcmp')
-rw-r--r--tools/syz-benchcmp/benchcmp.go8
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)
+ }
}
}