hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
....@@ -54,8 +54,10 @@
5454 "actions",
5555 "bpf"
5656 ],
57
+ "plugins": {
58
+ "requires": "buildebpfPlugin"
59
+ },
5760 "setup": [
58
- "make -C bpf",
5961 [
6062 "$TC action flush action bpf",
6163 0,
....@@ -69,8 +71,7 @@
6971 "matchPattern": "action order [0-9]*: bpf action.o:\\[action-ok\\] id [0-9]* tag [0-9a-f]{16}( jited)? default-action pipe.*index 667 ref",
7072 "matchCount": "1",
7173 "teardown": [
72
- "$TC action flush action bpf",
73
- "make -C bpf clean"
74
+ "$TC action flush action bpf"
7475 ]
7576 },
7677 {
....@@ -80,8 +81,10 @@
8081 "actions",
8182 "bpf"
8283 ],
84
+ "plugins": {
85
+ "requires": "buildebpfPlugin"
86
+ },
8387 "setup": [
84
- "make -C bpf",
8588 [
8689 "$TC action flush action bpf",
8790 0,
....@@ -100,8 +103,7 @@
100103 0,
101104 1,
102105 255
103
- ],
104
- "make -C bpf clean"
106
+ ]
105107 ]
106108 },
107109 {
....@@ -258,10 +260,10 @@
258260 255
259261 ]
260262 ],
261
- "cmdUnderTest": "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2054,6 0 0 262144,6 0 0 0' index 4294967296 cookie 12345",
263
+ "cmdUnderTest": "$TC action add action bpf bytecode '4,40 0 0 12,21 0 1 2054,6 0 0 262144,6 0 0 0' index 4294967296 cookie 123456",
262264 "expExitCode": "255",
263265 "verifyCmd": "$TC action ls action bpf",
264
- "matchPattern": "action order [0-9]*: bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' default-action pipe.*cookie 12345",
266
+ "matchPattern": "action order [0-9]*: bpf bytecode '4,40 0 0 12,21 0 1 2048,6 0 0 262144,6 0 0 0' default-action pipe.*cookie 123456",
265267 "matchCount": "0",
266268 "teardown": [
267269 "$TC action flush action bpf"
....@@ -290,5 +292,30 @@
290292 "teardown": [
291293 "$TC action flush action bpf"
292294 ]
295
+ },
296
+ {
297
+ "id": "b8a1",
298
+ "name": "Replace bpf action with invalid goto_chain control",
299
+ "category": [
300
+ "actions",
301
+ "bpf"
302
+ ],
303
+ "setup": [
304
+ [
305
+ "$TC actions flush action bpf",
306
+ 0,
307
+ 1,
308
+ 255
309
+ ],
310
+ "$TC action add action bpf bytecode '1,6 0 0 4294967295' pass index 90"
311
+ ],
312
+ "cmdUnderTest": "$TC action replace action bpf bytecode '1,6 0 0 4294967295' goto chain 42 index 90 cookie c1a0c1a0",
313
+ "expExitCode": "255",
314
+ "verifyCmd": "$TC action list action bpf",
315
+ "matchPattern": "action order [0-9]*: bpf.* default-action pass.*index 90",
316
+ "matchCount": "1",
317
+ "teardown": [
318
+ "$TC action flush action bpf"
319
+ ]
293320 }
294321 ]