MCPcopy Create free account
hub / github.com/apache/mesos / TEST_F

Function TEST_F

src/tests/containerizer/linux_seccomp_parser_tests.cpp:38–153  ·  view source on GitHub ↗

This test verifies that the Seccomp parser can parse a valid Seccomp profile.

Source from the content-addressed store, hash-verified

36
37// This test verifies that the Seccomp parser can parse a valid Seccomp profile.
38TEST_F(SeccompParserTest, SECCOMP_ParseSeccompProfile)
39{
40 const string config =
41 R"~(
42 {
43 "defaultAction": "SCMP_ACT_ERRNO",
44 "archMap": [
45 {
46 "architecture": "SCMP_ARCH_X86_64",
47 "subArchitectures": [
48 "SCMP_ARCH_X86",
49 "SCMP_ARCH_X32"
50 ]
51 },
52 {
53 "architecture": "SCMP_ARCH_AARCH64",
54 "subArchitectures": [
55 "SCMP_ARCH_ARM"
56 ]
57 }
58 ],
59 "syscalls": [
60 {
61 "names": [
62 "accept",
63 "writev"
64 ],
65 "action": "SCMP_ACT_ALLOW",
66 "args": [],
67 "comment": "",
68 "includes": {},
69 "excludes": {}
70 },
71 {
72 "names": [
73 "clone"
74 ],
75 "action": "SCMP_ACT_ALLOW",
76 "args": [
77 {
78 "index": 0,
79 "value": 2080505856,
80 "valueTwo": 0,
81 "op": "SCMP_CMP_MASKED_EQ"
82 }
83 ],
84 "comment": "",
85 "includes": {},
86 "excludes": {
87 "caps": [
88 "CAP_SYS_ADMIN"
89 ],
90 "arches": [
91 "s390",
92 "s390x"
93 ]
94 }
95 }

Callers

nothing calls this directly

Calls 11

parseProfileDataFunction · 0.85
checkFunction · 0.85
GetMethod · 0.80
actionMethod · 0.80
namesMethod · 0.65
errorMethod · 0.65
containsFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
valueMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected