-
Notifications
You must be signed in to change notification settings - Fork 735
/
Copy pathsyscalls_test.go
68 lines (53 loc) · 1.49 KB
/
syscalls_test.go
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package ebpf
import (
"testing"
"github.com/go-quicktest/qt"
"github.com/cilium/ebpf/internal/testutils"
)
func TestSanitizeName(t *testing.T) {
for input, want := range map[string]string{
"test": "test",
"": "",
"a-b": "ab",
"yeah so": "yeahso",
"dot.": "dot.",
"Capital": "Capital",
"t_est": "t_est",
"hörnchen": "hrnchen",
} {
qt.Assert(t, qt.Equals(sanitizeName(input, -1), want), qt.Commentf("input: %s", input))
}
}
func TestHaveBatchAPI(t *testing.T) {
testutils.CheckFeatureTest(t, haveBatchAPI)
}
func TestHaveObjName(t *testing.T) {
testutils.CheckFeatureTest(t, haveObjName)
}
func TestObjNameAllowsDot(t *testing.T) {
testutils.CheckFeatureTest(t, objNameAllowsDot)
}
func TestHaveNestedMaps(t *testing.T) {
testutils.CheckFeatureTest(t, haveNestedMaps)
}
func TestHaveMapMutabilityModifiers(t *testing.T) {
testutils.CheckFeatureTest(t, haveMapMutabilityModifiers)
}
func TestHaveMmapableMaps(t *testing.T) {
testutils.CheckFeatureTest(t, haveMmapableMaps)
}
func TestHaveInnerMaps(t *testing.T) {
testutils.CheckFeatureTest(t, haveInnerMaps)
}
func TestHaveProbeReadKernel(t *testing.T) {
testutils.CheckFeatureTest(t, haveProbeReadKernel)
}
func TestHaveBPFToBPFCalls(t *testing.T) {
testutils.CheckFeatureTest(t, haveBPFToBPFCalls)
}
func TestHaveSyscallWrapper(t *testing.T) {
testutils.CheckFeatureTest(t, haveSyscallWrapper)
}
func TestHaveProgramExtInfos(t *testing.T) {
testutils.CheckFeatureTest(t, haveProgramExtInfos)
}