4 "name": "Add valid pass action",
11 "$TC actions flush action gact",
17 "cmdUnderTest": "$TC actions add action pass index 8",
19 "verifyCmd": "$TC actions list action gact",
20 "matchPattern": "action order [0-9]*: gact action pass.*index 8 ref",
23 "$TC actions flush action gact"
28 "name": "Add valid pipe action",
35 "$TC actions flush action gact",
41 "cmdUnderTest": "$TC actions add action pipe index 6",
43 "verifyCmd": "$TC actions list action gact",
44 "matchPattern": "action order [0-9]*: gact action pipe.*index 6 ref",
47 "$TC actions flush action gact"
52 "name": "Add valid reclassify action",
59 "$TC actions flush action gact",
65 "cmdUnderTest": "$TC actions add action reclassify index 5",
67 "verifyCmd": "$TC actions list action gact",
68 "matchPattern": "action order [0-9]*: gact action reclassify.*index 5 ref",
71 "$TC actions flush action gact"
76 "name": "Add valid drop action",
83 "$TC actions flush action gact",
89 "cmdUnderTest": "$TC actions add action drop index 30",
91 "verifyCmd": "$TC actions list action gact",
92 "matchPattern": "action order [0-9]*: gact action drop.*index 30 ref",
95 "$TC actions flush action gact"
100 "name": "Add valid continue action",
107 "$TC actions flush action gact",
113 "cmdUnderTest": "$TC actions add action continue index 432",
115 "verifyCmd": "$TC actions list action gact",
116 "matchPattern": "action order [0-9]*: gact action continue.*index 432 ref",
119 "$TC actions flush action gact"
124 "name": "Add invalid action",
131 "$TC actions flush action gact",
137 "cmdUnderTest": "$TC actions add action pump index 386",
138 "expExitCode": "255",
139 "verifyCmd": "$TC actions list action gact",
140 "matchPattern": "action order [0-9]*: gact action.*index 386 ref",
143 "$TC actions flush action gact"
148 "name": "Add action with duplicate index",
155 "$TC actions flush action gact",
160 "$TC actions add action pipe index 15"
162 "cmdUnderTest": "$TC actions add action drop index 15",
163 "expExitCode": "255",
164 "verifyCmd": "$TC actions list action gact",
165 "matchPattern": "action order [0-9]*: gact action drop.*index 15 ref",
168 "$TC actions flush action gact"
173 "name": "Add action with index exceeding 32-bit maximum",
180 "$TC actions flush action gact",
186 "cmdUnderTest": "$TC actions add action drop index 4294967296",
187 "expExitCode": "255",
188 "verifyCmd": "actions list action gact",
189 "matchPattern": "action order [0-9]*: gact action drop.*index 4294967296 ref",
192 "$TC actions flush action gact"
197 "name": "Add action with index at 32-bit maximum",
204 "$TC actions flush action gact",
210 "cmdUnderTest": "$TC actions add action drop index 4294967295",
212 "verifyCmd": "$TC actions list action gact",
213 "matchPattern": "action order [0-9]*: gact action drop.*index 4294967295 ref",
216 "$TC actions flush action gact"
221 "name": "List actions",
228 "$TC actions flush action gact",
233 "$TC actions add action reclassify index 101",
234 "$TC actions add action reclassify index 102",
235 "$TC actions add action reclassify index 103",
236 "$TC actions add action reclassify index 104",
237 "$TC actions add action reclassify index 105"
239 "cmdUnderTest": "$TC actions list action gact",
241 "verifyCmd": "$TC actions list action gact",
242 "matchPattern": "action order [0-9]*: gact action reclassify",
245 "$TC actions flush action gact"
250 "name": "Flush gact actions",
256 "$TC actions add action reclassify index 101",
257 "$TC actions add action reclassify index 102",
258 "$TC actions add action reclassify index 103",
259 "$TC actions add action reclassify index 104",
260 "$TC actions add action reclassify index 105"
262 "cmdUnderTest": "$TC actions flush action gact",
264 "verifyCmd": "$TC actions list action gact",
265 "matchPattern": "action order [0-9]*: gact action reclassify",
271 "name": "Delete pass action",
278 "$TC actions flush action gact",
283 "$TC actions add action pass index 1"
285 "cmdUnderTest": "$TC actions del action gact index 1",
287 "verifyCmd": "$TC actions list action gact",
288 "matchPattern": "action order [0-9]*: gact action pass.*index 1 ref",
291 "$TC actions flush action gact"
296 "name": "Delete pipe action",
303 "$TC actions flush action gact",
308 "$TC actions add action pipe index 9"
310 "cmdUnderTest": "$TC actions del action gact index 9",
312 "verifyCmd": "$TC actions list action gact",
313 "matchPattern": "action order [0-9]*: gact action pipe.*index 9 ref",
316 "$TC actions flush action gact"
321 "name": "Delete reclassify action",
328 "$TC actions flush action gact",
333 "$TC actions add action reclassify index 65536"
335 "cmdUnderTest": "$TC actions del action gact index 65536",
337 "verifyCmd": "$TC actions list action gact",
338 "matchPattern": "action order [0-9]*: gact action reclassify.*index 65536 ref",
341 "$TC actions flush action gact"
346 "name": "Delete drop action",
353 "$TC actions flush action gact",
358 "$TC actions add action drop index 16"
360 "cmdUnderTest": "$TC actions del action gact index 16",
362 "verifyCmd": "$TC actions list action gact",
363 "matchPattern": "action order [0-9]*: gact action drop.*index 16 ref",
366 "$TC actions flush action gact"
371 "name": "Delete continue action",
378 "$TC actions flush action gact",
383 "$TC actions add action continue index 32"
385 "cmdUnderTest": "$TC actions del action gact index 32",
387 "verifyCmd": "actions list action gact",
388 "matchPattern": "action order [0-9]*: gact action continue.*index 32 ref",
391 "$TC actions flush action gact"
396 "name": "Delete non-existent action",
403 "$TC actions flush action gact",
409 "cmdUnderTest": "$TC actions del action gact index 2",
410 "expExitCode": "255",
411 "verifyCmd": "$TC actions list action gact",
412 "matchPattern": "action order [0-9]*: gact action",
415 "$TC actions flush action gact"
420 "name": "Replace gact action",
427 "$TC actions flush action gact",
432 "$TC actions add action drop index 10",
433 "$TC actions add action drop index 12"
435 "cmdUnderTest": "$TC actions replace action ok index 12",
437 "verifyCmd": "$TC actions ls action gact",
438 "matchPattern": "action order [0-9]*: gact action pass",
441 "$TC actions flush action gact"
446 "name": "Get gact action by index",
453 "$TC actions flush action gact",
458 "$TC actions add action drop index 3900800700"
460 "cmdUnderTest": "$TC actions get action gact index 3900800700",
462 "verifyCmd": "$TC actions get action gact index 3900800700",
463 "matchPattern": "index 3900800700",
466 "$TC actions flush action gact"
471 "name": "Add batch of 32 gact pass actions",
478 "$TC actions flush action gact",
484 "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action pass index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
486 "verifyCmd": "$TC actions list action gact",
487 "matchPattern": "^[ \t]+index [0-9]+ ref",
490 "$TC actions flush action gact"
495 "name": "Add batch of 32 gact continue actions with cookie",
502 "$TC actions flush action gact",
508 "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action continue index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
510 "verifyCmd": "$TC actions list action gact",
511 "matchPattern": "^[ \t]+index [0-9]+ ref",
514 "$TC actions flush action gact"
519 "name": "Delete batch of 32 gact continue actions",
526 "$TC actions flush action gact",
531 "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action continue index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
533 "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action gact index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
535 "verifyCmd": "$TC actions list action gact",
536 "matchPattern": "^[ \t]+index [0-9]+ ref",
542 "name": "Add gact action with random determ goto chain control action",
549 "$TC actions flush action gact",
555 "cmdUnderTest": "$TC actions add action pass random determ goto chain 1 2 index 90",
556 "expExitCode": "255",
557 "verifyCmd": "$TC actions list action gact",
558 "matchPattern": "action order [0-9]*: gact action pass random type determ goto chain 1 val 2.*index 90 ref",
561 "$TC actions flush action gact"