aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ipc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-11-29 13:23:42 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-11-30 14:50:50 +0100
commit5153aeaffd096514c1f2652c69cd0fc0d298b1d3 (patch)
tree5eb5155a43d5a0d43adca8a9e7c0c78ed0f43f6a /pkg/ipc
parentd5bd1f79fd780a53ab078b0302f972eb9560bf98 (diff)
syz-ci: test images before using them
Boot and minimally test images before declaring them as good and switching to using them. If image build/boot/test fails, upload report about this to dashboard.
Diffstat (limited to 'pkg/ipc')
-rw-r--r--pkg/ipc/ipc.go5
-rw-r--r--pkg/ipc/ipc_test.go3
2 files changed, 5 insertions, 3 deletions
diff --git a/pkg/ipc/ipc.go b/pkg/ipc/ipc.go
index 2f1cf3ef1..f6576342f 100644
--- a/pkg/ipc/ipc.go
+++ b/pkg/ipc/ipc.go
@@ -308,8 +308,7 @@ func (env *Env) Exec(opts *ExecOpts, p *prog.Prog) (output []byte, info []CallIn
if env.config.Flags&FlagUseShmem == 0 {
progData = env.in[:progSize]
}
- needOutput := env.config.Flags&FlagSignal != 0 || opts.Flags&FlagCollectComps != 0
- if needOutput && env.out != nil {
+ if env.out != nil {
// Zero out the first two words (ncmd and nsig), so that we don't have garbage there
// if executor crashes before writing non-garbage there.
for i := 0; i < 4; i++ {
@@ -333,7 +332,7 @@ func (env *Env) Exec(opts *ExecOpts, p *prog.Prog) (output []byte, info []CallIn
return
}
- if needOutput && env.out != nil {
+ if env.out != nil {
info, err0 = env.readOutCoverage(p)
}
return
diff --git a/pkg/ipc/ipc_test.go b/pkg/ipc/ipc_test.go
index 51e961119..6d1c2c80e 100644
--- a/pkg/ipc/ipc_test.go
+++ b/pkg/ipc/ipc_test.go
@@ -114,6 +114,9 @@ func TestExecute(t *testing.T) {
for i := 0; i < iters/len(flags); i++ {
p := target.Generate(rs, 10, nil)
+ if i == 0 {
+ p = target.GenerateSimpleProg()
+ }
opts := &ExecOpts{}
output, _, _, _, err := env.Exec(opts, p)
if err != nil {