blob: 5a24a16b92ba277a8e76006039ea4fd5a9ed3255 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// 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.
// TODO: switch syz-verifier to use syz-fuzzer.
//go:build ignore
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)
}
}
|