Skip to content
Permalink
Browse files

syz-repro: minor UX improvements.

  • Loading branch information...
Greg Steuck authored and dvyukov committed Nov 21, 2018
1 parent 2d8316b commit 5cdd8fe0e0878ffd44402beb72da79d828a5505f
Showing with 8 additions and 7 deletions.
  1. +8 −7 tools/syz-repro/repro.go
@@ -20,24 +20,25 @@ import (
)

var (
flagConfig = flag.String("config", "", "configuration file")
flagConfig = flag.String("config", "", "manager configuration file (manager.cfg)")
flagCount = flag.Int("count", 0, "number of VMs to use (overrides config count param)")
flagDebug = flag.Bool("debug", false, "print debug output")
)

func main() {
os.Args = append(append([]string{}, os.Args[0], "-v=10"), os.Args[1:]...)
flag.Parse()
if len(flag.Args()) != 1 || flagConfig == nil {
log.Fatalf("usage: syz-repro -config=manager.cfg execution.log")
}
cfg, err := mgrconfig.LoadFile(*flagConfig)
if err != nil {
log.Fatalf("%v", err)
}
if len(flag.Args()) != 1 {
log.Fatalf("usage: syz-repro -config=config.file execution.log")
log.Fatalf("%v: %v", *flagConfig, err)
}
data, err := ioutil.ReadFile(flag.Args()[0])
logFile := flag.Args()[0]
data, err := ioutil.ReadFile(logFile)
if err != nil {
log.Fatalf("failed to open log file: %v", err)
log.Fatalf("failed to open log file %v: %v", logFile, err)
}
if _, err := prog.GetTarget(cfg.TargetOS, cfg.TargetArch); err != nil {
log.Fatalf("%v", err)

0 comments on commit 5cdd8fe

Please sign in to comment.
You can’t perform that action at this time.