History

tc-testing: added tests with cookie for conntrack TC action

Roman Mashak committed 7 years ago

Commit c23fcbb1 parent 23c161e1 file · +72 −0Browse files

Unified · Split

tools/testing/selftests/tc-testing/tc-tests/actions/ct.json+72−0
@@ -23,6 +23,30 @@ · 22 unmodified lines
2323 "$TC actions flush action ct"
2424 ]
2525 },
26+ {
27+ "id": "e38c",
28+ "name": "Add simple ct action with cookie",
29+ "category": [
30+ "actions",
31+ "ct"
32+ ],
33+ "setup": [
34+ [
35+ "$TC actions flush action ct",
36+ 0,
37+ 1,
38+ 255
39+ ]
40+ ],
41+ "cmdUnderTest": "$TC actions add action ct index 42 cookie deadbeef",
42+ "expExitCode": "0",
43+ "verifyCmd": "$TC actions list action ct",
44+ "matchPattern": "action order [0-9]*: ct zone 0 pipe.*index 42 ref.*cookie deadbeef",
45+ "matchCount": "1",
46+ "teardown": [
47+ "$TC actions flush action ct"
48+ ]
49+ },
2650 {
2751 "id": "9f20",
2852 "name": "Add ct clear action",
@@ -47,6 +71,30 @@ · 18 unmodified lines
4771 "$TC actions flush action ct"
4872 ]
4973 },
74+ {
75+ "id": "0bc1",
76+ "name": "Add ct clear action with cookie of max length",
77+ "category": [
78+ "actions",
79+ "ct"
80+ ],
81+ "setup": [
82+ [
83+ "$TC actions flush action ct",
84+ 0,
85+ 1,
86+ 255
87+ ]
88+ ],
89+ "cmdUnderTest": "$TC actions add action ct clear index 42 cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
90+ "expExitCode": "0",
91+ "verifyCmd": "$TC actions list action ct",
92+ "matchPattern": "action order [0-9]*: ct clear pipe.*index 42 ref.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
93+ "matchCount": "1",
94+ "teardown": [
95+ "$TC actions flush action ct"
96+ ]
97+ },
5098 {
5199 "id": "5bea",
52100 "name": "Try ct with zone",
@@ -311,6 +359,30 @@ · 258 unmodified lines
311359 "$TC actions flush action ct"
312360 ]
313361 },
362+ {
363+ "id": "2faa",
364+ "name": "Try ct with mark + mask and cookie",
365+ "category": [
366+ "actions",
367+ "ct"
368+ ],
369+ "setup": [
370+ [
371+ "$TC actions flush action ct",
372+ 0,
373+ 1,
374+ 255
375+ ]
376+ ],
377+ "cmdUnderTest": "$TC actions add action ct mark 0x42/0xf0 index 42 cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
378+ "expExitCode": "0",
379+ "verifyCmd": "$TC actions list action ct",
380+ "matchPattern": "action order [0-9]*: ct mark 66/0xf0 zone 0 pipe.*index 42 ref.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
381+ "matchCount": "1",
382+ "teardown": [
383+ "$TC actions flush action ct"
384+ ]
385+ },
314386 {
315387 "id": "3991",
316388 "name": "Add simple ct action with no_percpu flag",