diff options
| author | Taras Madan <tarasmadan@google.com> | 2022-03-22 10:49:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-22 10:49:49 +0100 |
| commit | d88ef0c5c80d45a060e170c2706371f6b2957f55 (patch) | |
| tree | 742b3ec54df49deb796b201cefc7b7ba6035045e /syz-verifier/rpcserver_test.go | |
| parent | e2d91b1d0dd8c8b4760986ec8114469246022bb8 (diff) | |
syz-verifier: redesigned the analysis program generation and analysis flow (#2908)
Program verification logic is located in one function now.
VMs fetch programs from priority queues, not from the generator.
VMs operate the tasks, not programs now.
For the crashed VM - return error for every program in the queue
*fixed some road errors
Diffstat (limited to 'syz-verifier/rpcserver_test.go')
| -rw-r--r-- | syz-verifier/rpcserver_test.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/syz-verifier/rpcserver_test.go b/syz-verifier/rpcserver_test.go new file mode 100644 index 000000000..8d630e8c6 --- /dev/null +++ b/syz-verifier/rpcserver_test.go @@ -0,0 +1,32 @@ +// Copyright 2021 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package main + +import ( + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/syzkaller/pkg/rpctype" +) + +func TestConnect(t *testing.T) { + vrf := createTestVerifier(t) + vrf.pools = make(map[int]*poolInfo) + vrf.pools[1] = &poolInfo{} + + a := &rpctype.RunnerConnectArgs{ + Pool: 1, + VM: 1, + } + + r := &rpctype.RunnerConnectRes{} + + if err := vrf.srv.Connect(a, r); err != nil { + t.Fatalf("srv.Connect failed: %v", err) + } + + if diff := cmp.Diff(&rpctype.RunnerConnectRes{CheckUnsupportedCalls: true}, r); diff != "" { + t.Errorf("Connect result mismatch (-want +got):\n%s", diff) + } +} |
