4 "name": "Add valid sample action with mandatory arguments",
11 "$TC actions flush action sample",
17 "cmdUnderTest": "$TC actions add action sample rate 10 group 1 index 2",
19 "verifyCmd": "$TC actions get action sample index 2",
20 "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 2 ref",
23 "$TC actions flush action sample"
28 "name": "Add valid sample action with mandatory arguments and continue control action",
35 "$TC actions flush action sample",
41 "cmdUnderTest": "$TC actions add action sample rate 700 group 2 continue index 2",
43 "verifyCmd": "$TC actions get action sample index 2",
44 "matchPattern": "action order [0-9]+: sample rate 1/700 group 2 continue.*index 2 ref",
47 "$TC actions flush action sample"
52 "name": "Add valid sample action with mandatory arguments and drop control action",
59 "$TC actions flush action sample",
65 "cmdUnderTest": "$TC actions add action sample rate 10000 group 11 drop index 22",
67 "verifyCmd": "$TC actions list action sample",
68 "matchPattern": "action order [0-9]+: sample rate 1/10000 group 11 drop.*index 22 ref",
71 "$TC actions flush action sample"
76 "name": "Add valid sample action with mandatory arguments and reclassify control action",
83 "$TC actions flush action sample",
89 "cmdUnderTest": "$TC actions add action sample rate 20000 group 72 reclassify index 100",
91 "verifyCmd": "$TC actions list action sample",
92 "matchPattern": "action order [0-9]+: sample rate 1/20000 group 72 reclassify.*index 100 ref",
95 "$TC actions flush action sample"
100 "name": "Add valid sample action with mandatory arguments and pipe control action",
107 "$TC actions flush action sample",
113 "cmdUnderTest": "$TC actions add action sample rate 20 group 2 pipe index 100",
115 "verifyCmd": "$TC actions list action sample",
116 "matchPattern": "action order [0-9]+: sample rate 1/20 group 2 pipe.*index 100 ref",
119 "$TC actions flush action sample"
124 "name": "Add valid sample action with mandatory arguments and jump control action",
131 "$TC actions flush action sample",
137 "cmdUnderTest": "$TC actions add action sample rate 700 group 25 jump 4 index 200",
139 "verifyCmd": "$TC actions get action sample index 200",
140 "matchPattern": "action order [0-9]+: sample rate 1/700 group 25 jump 4.*index 200 ref",
143 "$TC actions flush action sample"
148 "name": "Add sample action with mandatory arguments and invalid control action",
155 "$TC actions flush action sample",
161 "cmdUnderTest": "$TC actions add action sample rate 200000 group 52 foo index 1",
162 "expExitCode": "255",
163 "verifyCmd": "$TC actions list action sample",
164 "matchPattern": "action order [0-9]+: sample rate 1/200000 group 52 foo.*index 1 ref",
170 "name": "Add invalid sample action without mandatory arguments",
177 "$TC actions flush action sample",
183 "cmdUnderTest": "$TC actions add action sample index 1",
184 "expExitCode": "255",
185 "verifyCmd": "$TC actions list action sample",
186 "matchPattern": "action order [0-9]+: sample.*index 1 ref",
192 "name": "Add invalid sample action without mandatory argument rate",
199 "$TC actions flush action sample",
205 "cmdUnderTest": "$TC actions add action sample group 10 index 1",
206 "expExitCode": "255",
207 "verifyCmd": "$TC actions list action sample",
208 "matchPattern": "action order [0-9]+: sample.*group 10.*index 1 ref",
214 "name": "Add invalid sample action without mandatory argument group",
221 "$TC actions flush action sample",
227 "cmdUnderTest": "$TC actions add action sample rate 100 index 10",
228 "expExitCode": "255",
229 "verifyCmd": "$TC actions get action sample index 10",
230 "matchPattern": "action order [0-9]+: sample rate 1/100.*index 10 ref",
236 "name": "Add invalid sample action without mandatory argument group",
243 "$TC actions flush action sample",
249 "cmdUnderTest": "$TC actions add action sample rate 100 index 10",
250 "expExitCode": "255",
251 "verifyCmd": "$TC actions get action sample index 10",
252 "matchPattern": "action order [0-9]+: sample rate 1/100.*index 10 ref",
258 "name": "Add valid sample action with trunc argument",
265 "$TC actions flush action sample",
271 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 trunc 1024 index 10",
273 "verifyCmd": "$TC actions get action sample index 10",
274 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 trunc_size 1024 pipe.*index 10 ref",
277 "$TC actions flush action sample"
282 "name": "Add sample action with maximum rate argument",
289 "$TC actions flush action sample",
295 "cmdUnderTest": "$TC actions add action sample rate 4294967295 group 4 index 10",
297 "verifyCmd": "$TC actions get action sample index 10",
298 "matchPattern": "action order [0-9]+: sample rate 1/4294967295 group 4 pipe.*index 10 ref",
301 "$TC actions flush action sample"
306 "name": "Add sample action with maximum trunc argument",
313 "$TC actions flush action sample",
319 "cmdUnderTest": "$TC actions add action sample rate 16000 group 4 trunc 4294967295 index 10",
321 "verifyCmd": "$TC actions get action sample index 10",
322 "matchPattern": "action order [0-9]+: sample rate 1/16000 group 4 trunc_size 4294967295 pipe.*index 10 ref",
325 "$TC actions flush action sample"
330 "name": "Add sample action with maximum group argument",
337 "$TC actions flush action sample",
343 "cmdUnderTest": "$TC actions add action sample rate 4294 group 4294967295 index 1",
345 "verifyCmd": "$TC actions get action sample index 1",
346 "matchPattern": "action order [0-9]+: sample rate 1/4294 group 4294967295 pipe.*index 1 ref",
349 "$TC actions flush action sample"
354 "name": "Add sample action with invalid rate argument",
361 "$TC actions flush action sample",
367 "cmdUnderTest": "$TC actions add action sample rate 4294967296 group 4 index 10",
368 "expExitCode": "255",
369 "verifyCmd": "$TC actions get action sample index 10",
370 "matchPattern": "action order [0-9]+: sample rate 1/4294967296 group 4 pipe.*index 10 ref",
376 "name": "Add sample action with invalid group argument",
383 "$TC actions flush action sample",
389 "cmdUnderTest": "$TC actions add action sample rate 4098 group 5294967299 continue index 1",
390 "expExitCode": "255",
391 "verifyCmd": "$TC actions get action sample index 1",
392 "matchPattern": "action order [0-9]+: sample rate 1/4098 group 5294967299 continue.*index 1 ref",
398 "name": "Add sample action with invalid trunc size",
405 "$TC actions flush action sample",
411 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 trunc 112233445566 index 11",
412 "expExitCode": "255",
413 "verifyCmd": "$TC actions get action sample index 11",
414 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 trunc_size 112233445566.*index 11 ref",
420 "name": "Add sample action with invalid index",
427 "$TC actions flush action sample",
433 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 index 5294967299",
434 "expExitCode": "255",
435 "verifyCmd": "$TC actions get action sample index 5294967299",
436 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 pipe.*index 5294967299 ref",
442 "name": "Add sample action with maximum allowed index",
449 "$TC actions flush action sample",
455 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 index 4294967295",
457 "verifyCmd": "$TC actions get action sample index 4294967295",
458 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 pipe.*index 4294967295 ref",
461 "$TC actions flush action sample"
466 "name": "Add sample action with cookie",
473 "$TC actions flush action sample",
479 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 index 45 cookie aabbccdd",
481 "verifyCmd": "$TC actions get action sample index 45",
482 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 pipe.*index 45.*cookie aabbccdd",
485 "$TC actions flush action sample"
490 "name": "Replace existing sample action with new rate argument",
497 "$TC actions flush action sample",
502 "$TC actions add action sample rate 1024 group 4 index 4"
504 "cmdUnderTest": "$TC actions replace action sample rate 2048 group 4 index 4",
506 "verifyCmd": "$TC actions list action sample",
507 "matchPattern": "action order [0-9]+: sample rate 1/2048 group 4 pipe.*index 4",
510 "$TC actions flush action sample"
515 "name": "Replace existing sample action with new group argument",
522 "$TC actions flush action sample",
527 "$TC actions add action sample rate 1024 group 4 index 4"
529 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 index 4",
531 "verifyCmd": "$TC actions list action sample",
532 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 7 pipe.*index 4",
535 "$TC actions flush action sample"
540 "name": "Replace existing sample action with new trunc argument",
547 "$TC actions flush action sample",
552 "$TC actions add action sample rate 1024 group 4 trunc 48 index 4"
554 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 trunc 64 index 4",
556 "verifyCmd": "$TC actions list action sample",
557 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 7 trunc_size 64 pipe.*index 4",
560 "$TC actions flush action sample"
565 "name": "Replace existing sample action with new control argument",
572 "$TC actions flush action sample",
577 "$TC actions add action sample rate 1024 group 4 reclassify index 4"
579 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 pipe index 4",
581 "verifyCmd": "$TC actions list action sample",
582 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 7 pipe.*index 4",
585 "$TC actions flush action sample"