0001 [
0002 {
0003 "id": "9784",
0004 "name": "Add valid sample action with mandatory arguments",
0005 "category": [
0006 "actions",
0007 "sample"
0008 ],
0009 "setup": [
0010 [
0011 "$TC actions flush action sample",
0012 0,
0013 1,
0014 255
0015 ]
0016 ],
0017 "cmdUnderTest": "$TC actions add action sample rate 10 group 1 index 2",
0018 "expExitCode": "0",
0019 "verifyCmd": "$TC actions get action sample index 2",
0020 "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 2 ref",
0021 "matchCount": "1",
0022 "teardown": [
0023 "$TC actions flush action sample"
0024 ]
0025 },
0026 {
0027 "id": "5c91",
0028 "name": "Add valid sample action with mandatory arguments and continue control action",
0029 "category": [
0030 "actions",
0031 "sample"
0032 ],
0033 "setup": [
0034 [
0035 "$TC actions flush action sample",
0036 0,
0037 1,
0038 255
0039 ]
0040 ],
0041 "cmdUnderTest": "$TC actions add action sample rate 700 group 2 continue index 2",
0042 "expExitCode": "0",
0043 "verifyCmd": "$TC actions get action sample index 2",
0044 "matchPattern": "action order [0-9]+: sample rate 1/700 group 2 continue.*index 2 ref",
0045 "matchCount": "1",
0046 "teardown": [
0047 "$TC actions flush action sample"
0048 ]
0049 },
0050 {
0051 "id": "334b",
0052 "name": "Add valid sample action with mandatory arguments and drop control action",
0053 "category": [
0054 "actions",
0055 "sample"
0056 ],
0057 "setup": [
0058 [
0059 "$TC actions flush action sample",
0060 0,
0061 1,
0062 255
0063 ]
0064 ],
0065 "cmdUnderTest": "$TC actions add action sample rate 10000 group 11 drop index 22",
0066 "expExitCode": "0",
0067 "verifyCmd": "$TC actions list action sample",
0068 "matchPattern": "action order [0-9]+: sample rate 1/10000 group 11 drop.*index 22 ref",
0069 "matchCount": "1",
0070 "teardown": [
0071 "$TC actions flush action sample"
0072 ]
0073 },
0074 {
0075 "id": "da69",
0076 "name": "Add valid sample action with mandatory arguments and reclassify control action",
0077 "category": [
0078 "actions",
0079 "sample"
0080 ],
0081 "setup": [
0082 [
0083 "$TC actions flush action sample",
0084 0,
0085 1,
0086 255
0087 ]
0088 ],
0089 "cmdUnderTest": "$TC actions add action sample rate 20000 group 72 reclassify index 100",
0090 "expExitCode": "0",
0091 "verifyCmd": "$TC actions list action sample",
0092 "matchPattern": "action order [0-9]+: sample rate 1/20000 group 72 reclassify.*index 100 ref",
0093 "matchCount": "1",
0094 "teardown": [
0095 "$TC actions flush action sample"
0096 ]
0097 },
0098 {
0099 "id": "13ce",
0100 "name": "Add valid sample action with mandatory arguments and pipe control action",
0101 "category": [
0102 "actions",
0103 "sample"
0104 ],
0105 "setup": [
0106 [
0107 "$TC actions flush action sample",
0108 0,
0109 1,
0110 255
0111 ]
0112 ],
0113 "cmdUnderTest": "$TC actions add action sample rate 20 group 2 pipe index 100",
0114 "expExitCode": "0",
0115 "verifyCmd": "$TC actions list action sample",
0116 "matchPattern": "action order [0-9]+: sample rate 1/20 group 2 pipe.*index 100 ref",
0117 "matchCount": "1",
0118 "teardown": [
0119 "$TC actions flush action sample"
0120 ]
0121 },
0122 {
0123 "id": "1886",
0124 "name": "Add valid sample action with mandatory arguments and jump control action",
0125 "category": [
0126 "actions",
0127 "sample"
0128 ],
0129 "setup": [
0130 [
0131 "$TC actions flush action sample",
0132 0,
0133 1,
0134 255
0135 ]
0136 ],
0137 "cmdUnderTest": "$TC actions add action sample rate 700 group 25 jump 4 index 200",
0138 "expExitCode": "0",
0139 "verifyCmd": "$TC actions get action sample index 200",
0140 "matchPattern": "action order [0-9]+: sample rate 1/700 group 25 jump 4.*index 200 ref",
0141 "matchCount": "1",
0142 "teardown": [
0143 "$TC actions flush action sample"
0144 ]
0145 },
0146 {
0147 "id": "7571",
0148 "name": "Add sample action with invalid rate",
0149 "category": [
0150 "actions",
0151 "sample"
0152 ],
0153 "setup": [
0154 [
0155 "$TC actions flush action sample",
0156 0,
0157 1,
0158 255
0159 ]
0160 ],
0161 "cmdUnderTest": "$TC actions add action sample rate 0 group 1 index 2",
0162 "expExitCode": "255",
0163 "verifyCmd": "$TC actions get action sample index 2",
0164 "matchPattern": "action order [0-9]+: sample rate 1/0 group 1.*index 2 ref",
0165 "matchCount": "0",
0166 "teardown": [
0167 "$TC actions flush action sample"
0168 ]
0169 },
0170 {
0171 "id": "b6d4",
0172 "name": "Add sample action with mandatory arguments and invalid control action",
0173 "category": [
0174 "actions",
0175 "sample"
0176 ],
0177 "setup": [
0178 [
0179 "$TC actions flush action sample",
0180 0,
0181 1,
0182 255
0183 ]
0184 ],
0185 "cmdUnderTest": "$TC actions add action sample rate 200000 group 52 foo index 1",
0186 "expExitCode": "255",
0187 "verifyCmd": "$TC actions list action sample",
0188 "matchPattern": "action order [0-9]+: sample rate 1/200000 group 52 foo.*index 1 ref",
0189 "matchCount": "0",
0190 "teardown": []
0191 },
0192 {
0193 "id": "a874",
0194 "name": "Add invalid sample action without mandatory arguments",
0195 "category": [
0196 "actions",
0197 "sample"
0198 ],
0199 "setup": [
0200 [
0201 "$TC actions flush action sample",
0202 0,
0203 1,
0204 255
0205 ]
0206 ],
0207 "cmdUnderTest": "$TC actions add action sample index 1",
0208 "expExitCode": "255",
0209 "verifyCmd": "$TC actions list action sample",
0210 "matchPattern": "action order [0-9]+: sample.*index 1 ref",
0211 "matchCount": "0",
0212 "teardown": []
0213 },
0214 {
0215 "id": "ac01",
0216 "name": "Add invalid sample action without mandatory argument rate",
0217 "category": [
0218 "actions",
0219 "sample"
0220 ],
0221 "setup": [
0222 [
0223 "$TC actions flush action sample",
0224 0,
0225 1,
0226 255
0227 ]
0228 ],
0229 "cmdUnderTest": "$TC actions add action sample group 10 index 1",
0230 "expExitCode": "255",
0231 "verifyCmd": "$TC actions list action sample",
0232 "matchPattern": "action order [0-9]+: sample.*group 10.*index 1 ref",
0233 "matchCount": "0",
0234 "teardown": []
0235 },
0236 {
0237 "id": "4203",
0238 "name": "Add invalid sample action without mandatory argument group",
0239 "category": [
0240 "actions",
0241 "sample"
0242 ],
0243 "setup": [
0244 [
0245 "$TC actions flush action sample",
0246 0,
0247 1,
0248 255
0249 ]
0250 ],
0251 "cmdUnderTest": "$TC actions add action sample rate 100 index 10",
0252 "expExitCode": "255",
0253 "verifyCmd": "$TC actions get action sample index 10",
0254 "matchPattern": "action order [0-9]+: sample rate 1/100.*index 10 ref",
0255 "matchCount": "0",
0256 "teardown": []
0257 },
0258 {
0259 "id": "14a7",
0260 "name": "Add invalid sample action without mandatory argument group",
0261 "category": [
0262 "actions",
0263 "sample"
0264 ],
0265 "setup": [
0266 [
0267 "$TC actions flush action sample",
0268 0,
0269 1,
0270 255
0271 ]
0272 ],
0273 "cmdUnderTest": "$TC actions add action sample rate 100 index 10",
0274 "expExitCode": "255",
0275 "verifyCmd": "$TC actions get action sample index 10",
0276 "matchPattern": "action order [0-9]+: sample rate 1/100.*index 10 ref",
0277 "matchCount": "0",
0278 "teardown": []
0279 },
0280 {
0281 "id": "8f2e",
0282 "name": "Add valid sample action with trunc argument",
0283 "category": [
0284 "actions",
0285 "sample"
0286 ],
0287 "setup": [
0288 [
0289 "$TC actions flush action sample",
0290 0,
0291 1,
0292 255
0293 ]
0294 ],
0295 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 trunc 1024 index 10",
0296 "expExitCode": "0",
0297 "verifyCmd": "$TC actions get action sample index 10",
0298 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 trunc_size 1024 pipe.*index 10 ref",
0299 "matchCount": "1",
0300 "teardown": [
0301 "$TC actions flush action sample"
0302 ]
0303 },
0304 {
0305 "id": "45f8",
0306 "name": "Add sample action with maximum rate argument",
0307 "category": [
0308 "actions",
0309 "sample"
0310 ],
0311 "setup": [
0312 [
0313 "$TC actions flush action sample",
0314 0,
0315 1,
0316 255
0317 ]
0318 ],
0319 "cmdUnderTest": "$TC actions add action sample rate 4294967295 group 4 index 10",
0320 "expExitCode": "0",
0321 "verifyCmd": "$TC actions get action sample index 10",
0322 "matchPattern": "action order [0-9]+: sample rate 1/4294967295 group 4 pipe.*index 10 ref",
0323 "matchCount": "1",
0324 "teardown": [
0325 "$TC actions flush action sample"
0326 ]
0327 },
0328 {
0329 "id": "ad0c",
0330 "name": "Add sample action with maximum trunc argument",
0331 "category": [
0332 "actions",
0333 "sample"
0334 ],
0335 "setup": [
0336 [
0337 "$TC actions flush action sample",
0338 0,
0339 1,
0340 255
0341 ]
0342 ],
0343 "cmdUnderTest": "$TC actions add action sample rate 16000 group 4 trunc 4294967295 index 10",
0344 "expExitCode": "0",
0345 "verifyCmd": "$TC actions get action sample index 10",
0346 "matchPattern": "action order [0-9]+: sample rate 1/16000 group 4 trunc_size 4294967295 pipe.*index 10 ref",
0347 "matchCount": "1",
0348 "teardown": [
0349 "$TC actions flush action sample"
0350 ]
0351 },
0352 {
0353 "id": "83a9",
0354 "name": "Add sample action with maximum group argument",
0355 "category": [
0356 "actions",
0357 "sample"
0358 ],
0359 "setup": [
0360 [
0361 "$TC actions flush action sample",
0362 0,
0363 1,
0364 255
0365 ]
0366 ],
0367 "cmdUnderTest": "$TC actions add action sample rate 4294 group 4294967295 index 1",
0368 "expExitCode": "0",
0369 "verifyCmd": "$TC actions get action sample index 1",
0370 "matchPattern": "action order [0-9]+: sample rate 1/4294 group 4294967295 pipe.*index 1 ref",
0371 "matchCount": "1",
0372 "teardown": [
0373 "$TC actions flush action sample"
0374 ]
0375 },
0376 {
0377 "id": "ed27",
0378 "name": "Add sample action with invalid rate argument",
0379 "category": [
0380 "actions",
0381 "sample"
0382 ],
0383 "setup": [
0384 [
0385 "$TC actions flush action sample",
0386 0,
0387 1,
0388 255
0389 ]
0390 ],
0391 "cmdUnderTest": "$TC actions add action sample rate 4294967296 group 4 index 10",
0392 "expExitCode": "255",
0393 "verifyCmd": "$TC actions get action sample index 10",
0394 "matchPattern": "action order [0-9]+: sample rate 1/4294967296 group 4 pipe.*index 10 ref",
0395 "matchCount": "0",
0396 "teardown": []
0397 },
0398 {
0399 "id": "2eae",
0400 "name": "Add sample action with invalid group argument",
0401 "category": [
0402 "actions",
0403 "sample"
0404 ],
0405 "setup": [
0406 [
0407 "$TC actions flush action sample",
0408 0,
0409 1,
0410 255
0411 ]
0412 ],
0413 "cmdUnderTest": "$TC actions add action sample rate 4098 group 5294967299 continue index 1",
0414 "expExitCode": "255",
0415 "verifyCmd": "$TC actions get action sample index 1",
0416 "matchPattern": "action order [0-9]+: sample rate 1/4098 group 5294967299 continue.*index 1 ref",
0417 "matchCount": "0",
0418 "teardown": []
0419 },
0420 {
0421 "id": "6ff3",
0422 "name": "Add sample action with invalid trunc size",
0423 "category": [
0424 "actions",
0425 "sample"
0426 ],
0427 "setup": [
0428 [
0429 "$TC actions flush action sample",
0430 0,
0431 1,
0432 255
0433 ]
0434 ],
0435 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 trunc 112233445566 index 11",
0436 "expExitCode": "255",
0437 "verifyCmd": "$TC actions get action sample index 11",
0438 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 trunc_size 112233445566.*index 11 ref",
0439 "matchCount": "0",
0440 "teardown": []
0441 },
0442 {
0443 "id": "2b2a",
0444 "name": "Add sample action with invalid index",
0445 "category": [
0446 "actions",
0447 "sample"
0448 ],
0449 "setup": [
0450 [
0451 "$TC actions flush action sample",
0452 0,
0453 1,
0454 255
0455 ]
0456 ],
0457 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 index 5294967299",
0458 "expExitCode": "255",
0459 "verifyCmd": "$TC actions get action sample index 5294967299",
0460 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 pipe.*index 5294967299 ref",
0461 "matchCount": "0",
0462 "teardown": []
0463 },
0464 {
0465 "id": "dee2",
0466 "name": "Add sample action with maximum allowed index",
0467 "category": [
0468 "actions",
0469 "sample"
0470 ],
0471 "setup": [
0472 [
0473 "$TC actions flush action sample",
0474 0,
0475 1,
0476 255
0477 ]
0478 ],
0479 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 index 4294967295",
0480 "expExitCode": "0",
0481 "verifyCmd": "$TC actions get action sample index 4294967295",
0482 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 pipe.*index 4294967295 ref",
0483 "matchCount": "1",
0484 "teardown": [
0485 "$TC actions flush action sample"
0486 ]
0487 },
0488 {
0489 "id": "560e",
0490 "name": "Add sample action with cookie",
0491 "category": [
0492 "actions",
0493 "sample"
0494 ],
0495 "setup": [
0496 [
0497 "$TC actions flush action sample",
0498 0,
0499 1,
0500 255
0501 ]
0502 ],
0503 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 index 45 cookie aabbccdd",
0504 "expExitCode": "0",
0505 "verifyCmd": "$TC actions get action sample index 45",
0506 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 pipe.*index 45.*cookie aabbccdd",
0507 "matchCount": "1",
0508 "teardown": [
0509 "$TC actions flush action sample"
0510 ]
0511 },
0512 {
0513 "id": "704a",
0514 "name": "Replace existing sample action with new rate argument",
0515 "category": [
0516 "actions",
0517 "sample"
0518 ],
0519 "setup": [
0520 [
0521 "$TC actions flush action sample",
0522 0,
0523 1,
0524 255
0525 ],
0526 "$TC actions add action sample rate 1024 group 4 index 4"
0527 ],
0528 "cmdUnderTest": "$TC actions replace action sample rate 2048 group 4 index 4",
0529 "expExitCode": "0",
0530 "verifyCmd": "$TC actions list action sample",
0531 "matchPattern": "action order [0-9]+: sample rate 1/2048 group 4 pipe.*index 4",
0532 "matchCount": "1",
0533 "teardown": [
0534 "$TC actions flush action sample"
0535 ]
0536 },
0537 {
0538 "id": "60eb",
0539 "name": "Replace existing sample action with new group argument",
0540 "category": [
0541 "actions",
0542 "sample"
0543 ],
0544 "setup": [
0545 [
0546 "$TC actions flush action sample",
0547 0,
0548 1,
0549 255
0550 ],
0551 "$TC actions add action sample rate 1024 group 4 index 4"
0552 ],
0553 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 index 4",
0554 "expExitCode": "0",
0555 "verifyCmd": "$TC actions list action sample",
0556 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 7 pipe.*index 4",
0557 "matchCount": "1",
0558 "teardown": [
0559 "$TC actions flush action sample"
0560 ]
0561 },
0562 {
0563 "id": "2cce",
0564 "name": "Replace existing sample action with new trunc argument",
0565 "category": [
0566 "actions",
0567 "sample"
0568 ],
0569 "setup": [
0570 [
0571 "$TC actions flush action sample",
0572 0,
0573 1,
0574 255
0575 ],
0576 "$TC actions add action sample rate 1024 group 4 trunc 48 index 4"
0577 ],
0578 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 trunc 64 index 4",
0579 "expExitCode": "0",
0580 "verifyCmd": "$TC actions list action sample",
0581 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 7 trunc_size 64 pipe.*index 4",
0582 "matchCount": "1",
0583 "teardown": [
0584 "$TC actions flush action sample"
0585 ]
0586 },
0587 {
0588 "id": "59d1",
0589 "name": "Replace existing sample action with new control argument",
0590 "category": [
0591 "actions",
0592 "sample"
0593 ],
0594 "setup": [
0595 [
0596 "$TC actions flush action sample",
0597 0,
0598 1,
0599 255
0600 ],
0601 "$TC actions add action sample rate 1024 group 4 reclassify index 4"
0602 ],
0603 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 pipe index 4",
0604 "expExitCode": "0",
0605 "verifyCmd": "$TC actions list action sample",
0606 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 7 pipe.*index 4",
0607 "matchCount": "1",
0608 "teardown": [
0609 "$TC actions flush action sample"
0610 ]
0611 },
0612 {
0613 "id": "0a6e",
0614 "name": "Replace sample action with invalid goto chain control",
0615 "category": [
0616 "actions",
0617 "sample"
0618 ],
0619 "setup": [
0620 [
0621 "$TC actions flush action sample",
0622 0,
0623 1,
0624 255
0625 ],
0626 "$TC actions add action sample rate 1024 group 4 pass index 90"
0627 ],
0628 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 goto chain 42 index 90 cookie c1a0c1a0",
0629 "expExitCode": "255",
0630 "verifyCmd": "$TC actions list action sample",
0631 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 4 pass.*index 90",
0632 "matchCount": "1",
0633 "teardown": [
0634 "$TC actions flush action sample"
0635 ]
0636 }
0637 ]