aboutsummaryrefslogtreecommitdiffstats
path: root/executor/test_test.go
blob: 8048d50f0b838702b78467a12872f319e67f88b7 (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
// Copyright 2016 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.

// +build linux

package executor

import "testing"

func testWrapper(t *testing.T, f func() int) {
	switch res := f(); {
	case res < 0:
		t.Skip()
	case res > 0:
		t.Fail()
	default:
	}
}

func TestCopyin(t *testing.T) {
	testWrapper(t, testCopyin)
}

func TestCsumInet(t *testing.T) {
	testWrapper(t, testCsumInet)
}

func TestCsumInetAcc(t *testing.T) {
	testWrapper(t, testCsumInetAcc)
}

func TestKVM(t *testing.T) {
	testWrapper(t, testKVM)
}