xref: /linux/tools/testing/selftests/tc-testing/tc-tests/actions/ctinfo.json (revision f6154d8babbb8a98f0d3ea325aafae2e33bfd8be)
1[
2    {
3        "id": "c826",
4        "name": "Add ctinfo action with default setting",
5        "category": [
6            "actions",
7            "ctinfo"
8        ],
9        "plugins": {
10           "requires": "nsPlugin"
11        },
12        "setup": [
13            [
14                "$TC action flush action ctinfo",
15                0,
16                1,
17                255
18            ]
19        ],
20        "cmdUnderTest": "$TC action add action ctinfo index 10",
21        "expExitCode": "0",
22        "verifyCmd": "$TC action get action ctinfo index 10",
23        "matchPattern": "action order [0-9]*: ctinfo zone 0 pipe.*index 10 ref",
24        "matchCount": "1",
25        "teardown": [
26            "$TC action flush action ctinfo"
27        ]
28    },
29    {
30        "id": "0286",
31        "name": "Add ctinfo action with dscp",
32        "category": [
33            "actions",
34            "ctinfo"
35        ],
36        "plugins": {
37           "requires": "nsPlugin"
38        },
39        "setup": [
40            [
41                "$TC actions flush action ctinfo",
42                0,
43                1,
44                255
45            ]
46        ],
47        "cmdUnderTest": "$TC action add action ctinfo dscp 0xfc000000 0x01000000 index 100",
48        "expExitCode": "0",
49        "verifyCmd": "$TC action ls action ctinfo",
50        "matchPattern": "action order [0-9]*: ctinfo zone 0 pipe.*index 100 ref.*dscp 0xfc000000 0x01000000",
51        "matchCount": "1",
52        "teardown": [
53            "$TC actions flush action ctinfo"
54        ]
55    },
56    {
57        "id": "4938",
58        "name": "Add ctinfo action with valid cpmark and zone",
59        "category": [
60            "actions",
61            "ctinfo"
62        ],
63        "plugins": {
64           "requires": "nsPlugin"
65        },
66        "setup": [
67            [
68                "$TC action flush action ctinfo",
69                0,
70                1,
71                255
72            ]
73        ],
74        "cmdUnderTest": "$TC action add action ctinfo cpmark 0x01000000 zone 1 index 1",
75        "expExitCode": "0",
76        "verifyCmd": "$TC action get action ctinfo index 1",
77        "matchPattern": "action order [0-9]*: ctinfo zone 1 pipe.*index 1 ref.*cpmark 0x01000000",
78        "matchCount": "1",
79        "teardown": [
80            "$TC action flush action ctinfo"
81        ]
82    },
83    {
84        "id": "7593",
85        "name": "Add ctinfo action with drop control",
86        "category": [
87            "actions",
88            "ctinfo"
89        ],
90        "plugins": {
91           "requires": "nsPlugin"
92        },
93        "setup": [
94            [
95                "$TC action flush action ctinfo",
96                0,
97                1,
98                255
99            ]
100        ],
101        "cmdUnderTest": "$TC action add action ctinfo drop index 1000",
102        "expExitCode": "0",
103        "verifyCmd": "$TC action ls action ctinfo",
104        "matchPattern": "action order [0-9]*: ctinfo zone 0 drop.*index 1000 ref",
105        "matchCount": "1",
106        "teardown": [
107            "$TC action flush action ctinfo"
108        ]
109    },
110    {
111        "id": "2961",
112        "name": "Replace ctinfo action zone and action control",
113        "category": [
114            "actions",
115            "ctinfo"
116        ],
117        "plugins": {
118           "requires": "nsPlugin"
119        },
120        "setup": [
121            [
122                "$TC actions flush action ctinfo",
123                0,
124                1,
125                255
126            ],
127            [
128                "$TC action add action ctinfo zone 1 drop index 1",
129                0,
130                1,
131                255
132            ]
133        ],
134        "cmdUnderTest": "$TC action replace action ctinfo zone 200 pass index 1",
135        "expExitCode": "0",
136        "verifyCmd": "$TC action get action ctinfo index 1",
137        "matchPattern": "action order [0-9]*: ctinfo zone 200 pass.*index 1 ref",
138        "matchCount": "1",
139        "teardown": [
140            "$TC action flush action ctinfo"
141        ]
142    },
143    {
144        "id": "e567",
145        "name": "Delete ctinfo action with valid index",
146        "category": [
147            "actions",
148            "ctinfo"
149        ],
150        "plugins": {
151           "requires": "nsPlugin"
152        },
153        "setup": [
154            [
155                "$TC actions flush action ctinfo",
156                0,
157                1,
158                255
159            ],
160            [
161                "$TC action add action ctinfo zone 200 pass index 1",
162                0,
163                1,
164                255
165            ]
166        ],
167        "cmdUnderTest": "$TC action delete action ctinfo index 1",
168        "expExitCode": "0",
169        "verifyCmd": "$TC action get action ctinfo index 1",
170        "matchPattern": "action order [0-9]*: ctinfo zone 200 pass.*index 1 ref",
171        "matchCount": "0",
172        "teardown": [
173            "$TC action flush action ctinfo"
174        ]
175    },
176    {
177        "id": "6a91",
178        "name": "Delete ctinfo action with invalid index",
179        "category": [
180            "actions",
181            "ctinfo"
182        ],
183        "plugins": {
184           "requires": "nsPlugin"
185        },
186        "setup": [
187            [
188                "$TC actions flush action ctinfo",
189                0,
190                1,
191                255
192            ],
193            [
194                "$TC action add action ctinfo zone 200 pass index 1",
195                0,
196                1,
197                255
198            ]
199        ],
200        "cmdUnderTest": "$TC action delete action ctinfo index 333",
201        "expExitCode": "255",
202        "verifyCmd": "$TC action get action ctinfo index 1",
203        "matchPattern": "action order [0-9]*: ctinfo zone 200 pass.*index 1 ref",
204        "matchCount": "1",
205        "teardown": [
206            "$TC action flush action ctinfo"
207        ]
208    },
209    {
210        "id": "5232",
211        "name": "List ctinfo actions",
212        "category": [
213            "actions",
214            "ctinfo"
215        ],
216        "plugins": {
217           "requires": "nsPlugin"
218        },
219        "setup": [
220            [
221                "$TC action flush action ctinfo",
222                0,
223                1,
224                255
225            ],
226            "$TC action add action ctinfo zone 20 pass index 101",
227            "$TC action add action ctinfo cpmark 0x02000000 drop index 102",
228            "$TC action add action ctinfo continue index 103"
229        ],
230        "cmdUnderTest": "$TC action list action ctinfo",
231        "expExitCode": "0",
232        "verifyCmd": "$TC action list action ctinfo",
233        "matchPattern": "action order [0-9]*: ctinfo",
234        "matchCount": "3",
235        "teardown": [
236            "$TC actions flush action ctinfo"
237        ]
238    },
239    {
240        "id": "7702",
241        "name": "Flush ctinfo actions",
242        "category": [
243            "actions",
244            "ctinfo"
245        ],
246        "plugins": {
247           "requires": "nsPlugin"
248        },
249        "setup": [
250            [
251                "$TC actions flush action ctinfo",
252                0,
253                1,
254                255
255            ],
256	    "$TC action add action ctinfo zone 20 pass index 101",
257            "$TC action add action ctinfo cpmark 0x02000000 drop index 102",
258            "$TC action add action ctinfo continue index 103"
259        ],
260        "cmdUnderTest": "$TC action flush action ctinfo",
261        "expExitCode": "0",
262        "verifyCmd": "$TC action list action ctinfo",
263        "matchPattern": "action order [0-9]*: ctinfo",
264        "matchCount": "0",
265        "teardown": [
266            "$TC actions flush action ctinfo"
267        ]
268    },
269    {
270        "id": "3201",
271        "name": "Add ctinfo action with duplicate index",
272        "category": [
273            "actions",
274            "ctinfo"
275        ],
276        "plugins": {
277           "requires": "nsPlugin"
278        },
279        "setup": [
280            [
281                "$TC actions flush action ctinfo",
282                0,
283                1,
284                255
285            ],
286            "$TC action add action ctinfo zone 20 pass index 101"
287        ],
288        "cmdUnderTest": "$TC action add action ctinfo cpmark 0x02000000 drop index 101",
289        "expExitCode": "255",
290        "verifyCmd": "$TC action get action ctinfo index 101",
291        "matchPattern": "action order [0-9]*: ctinfo zone 20 pass.*index 101",
292        "matchCount": "1",
293        "teardown": [
294            "$TC action flush action ctinfo"
295        ]
296    },
297    {
298        "id": "8295",
299        "name": "Add ctinfo action with invalid index",
300        "category": [
301            "actions",
302            "ctinfo"
303        ],
304        "plugins": {
305           "requires": "nsPlugin"
306        },
307        "setup": [
308            [
309                "$TC actions flush action ctinfo",
310                0,
311                1,
312                255
313            ]
314        ],
315        "cmdUnderTest": "$TC action add action ctinfo zone 20 index 4294967296",
316        "expExitCode": "255",
317        "verifyCmd": "$TC action ls action ctinfo",
318        "matchPattern": "action order [0-9]*: ctinfo",
319        "matchCount": "0",
320        "teardown": [
321            "$TC action flush action ctinfo"
322        ]
323    },
324    {
325        "id": "3964",
326        "name": "Replace ctinfo action with invalid goto_chain control",
327        "category": [
328            "actions",
329            "ctinfo"
330        ],
331        "plugins": {
332           "requires": "nsPlugin"
333        },
334        "setup": [
335            [
336                "$TC actions flush action ctinfo",
337                0,
338                1,
339                255
340            ],
341            "$TC action add action ctinfo pass index 90"
342        ],
343        "cmdUnderTest": "$TC action replace action ctinfo goto chain 42 index 90",
344        "expExitCode": "255",
345        "verifyCmd": "$TC action list action ctinfo",
346        "matchPattern": "action order [0-9]*: ctinfo.*pass.*index 90",
347        "matchCount": "1",
348        "teardown": [
349            "$TC action flush action ctinfo"
350        ]
351    }
352]
353