aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-05-25 16:37:05 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-05-29 13:15:07 +0200
commit0fcd5fd3ddb45f5571658c4fce1589427a5bf090 (patch)
treecf2c53985762fb05b316b2bb868d51d171fc3560 /ipc
parent220dc49106d66ff912db835004c88f8c9e2d1707 (diff)
all: speed up tests
Mark tests as parallel where makes sense. Speed up sys.TransitivelyEnabledCalls. Execution time is now: ok github.com/google/syzkaller/config 0.172s ok github.com/google/syzkaller/cover 0.060s ok github.com/google/syzkaller/csource 3.081s ok github.com/google/syzkaller/db 0.395s ok github.com/google/syzkaller/executor 0.060s ok github.com/google/syzkaller/fileutil 0.106s ok github.com/google/syzkaller/host 1.530s ok github.com/google/syzkaller/ifuzz 0.491s ok github.com/google/syzkaller/ipc 1.374s ok github.com/google/syzkaller/log 0.014s ok github.com/google/syzkaller/prog 2.604s ok github.com/google/syzkaller/report 0.045s ok github.com/google/syzkaller/symbolizer 0.062s ok github.com/google/syzkaller/sys 0.365s ok github.com/google/syzkaller/syz-dash 0.014s ok github.com/google/syzkaller/syz-hub/state 0.427s ok github.com/google/syzkaller/vm 0.052s However, main time is still taken by rebuilding sys package. Fixes #182
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipc/ipc_test.go b/ipc/ipc_test.go
index f1aef472a..726da8485 100644
--- a/ipc/ipc_test.go
+++ b/ipc/ipc_test.go
@@ -38,6 +38,7 @@ func buildProgram(t *testing.T, src string) string {
}
func initTest(t *testing.T) (rand.Source, int) {
+ t.Parallel()
iters := 100
if testing.Short() {
iters = 10
@@ -76,11 +77,12 @@ func TestEmptyProg(t *testing.T) {
}
func TestExecute(t *testing.T) {
+ rs, iters := initTest(t)
+ flags := []uint64{0, FlagThreaded, FlagThreaded | FlagCollide}
+
bin := buildExecutor(t)
defer os.Remove(bin)
- rs, iters := initTest(t)
- flags := []uint64{0, FlagThreaded, FlagThreaded | FlagCollide}
for _, flag := range flags {
t.Logf("testing flags 0x%x\n", flag)
cfg := Config{