aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2017-05-26 16:11:19 -0700
committerMichael Pratt <mpratt@google.com>2017-05-30 09:33:51 -0700
commit29fc5b76cdfa2f32e7965f54aeb28356b93f3704 (patch)
tree28d1ae8bd5bc68a62ab219b609c257866fcceca4 /tools
parent75b66eabef6ee2b89d89f31d90ff2ed9d3478c39 (diff)
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.
Diffstat (limited to 'tools')
-rw-r--r--tools/syz-stress/stress.go8
1 files changed, 2 insertions, 6 deletions
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)
}
}