From 29fc5b76cdfa2f32e7965f54aeb28356b93f3704 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Fri, 26 May 2017 16:11:19 -0700 Subject: all: cleanup executor/ipc status checking This is mostly a cleanup change with little functional change. In ipc.command.exec, remove the status fallback from the pipe to the exit status. Once the executor is serving, it always writes the status over the pipe; anything else is an error. Remove the panic check in syz-stress, which is no longer needed. --- tools/syz-stress/stress.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/syz-stress/stress.go b/tools/syz-stress/stress.go index 5885e233d..4cf8d931f 100644 --- a/tools/syz-stress/stress.go +++ b/tools/syz-stress/stress.go @@ -8,7 +8,6 @@ import ( "fmt" "math/rand" "os" - "regexp" "runtime" "sync" "sync/atomic" @@ -30,8 +29,6 @@ var ( flagLogProg = flag.Bool("logprog", false, "print programs before execution") flagGenerate = flag.Bool("generate", true, "generate new programs, otherwise only mutate corpus") - failedRe = regexp.MustCompile("runtime error: |panic: |Panic: ") - statExec uint64 gate *ipc.Gate ) @@ -105,11 +102,10 @@ func execute(pid int, env *ipc.Env, p *prog.Prog) { if err != nil { fmt.Printf("failed to execute executor: %v\n", err) } - paniced := failedRe.Match(output) - if failed || hanged || paniced || err != nil { + if failed || hanged || err != nil { fmt.Printf("PROGRAM:\n%s\n", p.Serialize()) } - if failed || hanged || paniced || err != nil || *flagOutput { + if failed || hanged || err != nil || *flagOutput { os.Stdout.Write(output) } } -- cgit mrf-deployment