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