1[ 2 { 3 "id": "9784", 4 "name": "Add valid sample action with mandatory arguments", 5 "category": [ 6 "actions", 7 "sample" 8 ], 9 "setup": [ 10 [ 11 "$TC actions flush action sample", 12 0, 13 1, 14 255 15 ] 16 ], 17 "cmdUnderTest": "$TC actions add action sample rate 10 group 1 index 2", 18 "expExitCode": "0", 19 "verifyCmd": "$TC actions get action sample index 2", 20 "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 2 ref", 21 "matchCount": "1", 22 "teardown": [ 23 "$TC actions flush action sample" 24 ] 25 }, 26 { 27 "id": "5c91", 28 "name": "Add valid sample action with mandatory arguments and continue control action", 29 "category": [ 30 "actions", 31 "sample" 32 ], 33 "setup": [ 34 [ 35 "$TC actions flush action sample", 36 0, 37 1, 38 255 39 ] 40 ], 41 "cmdUnderTest": "$TC actions add action sample rate 700 group 2 continue index 2", 42 "expExitCode": "0", 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", 45 "matchCount": "1", 46 "teardown": [ 47 "$TC actions flush action sample" 48 ] 49 }, 50 { 51 "id": "334b", 52 "name": "Add valid sample action with mandatory arguments and drop control action", 53 "category": [ 54 "actions", 55 "sample" 56 ], 57 "setup": [ 58 [ 59 "$TC actions flush action sample", 60 0, 61 1, 62 255 63 ] 64 ], 65 "cmdUnderTest": "$TC actions add action sample rate 10000 group 11 drop index 22", 66 "expExitCode": "0", 67 "verifyCmd": "$TC actions list action sample", 68 "matchPattern": "action order [0-9]+: sample rate 1/10000 group 11 drop.*index 22 ref", 69 "matchCount": "1", 70 "teardown": [ 71 "$TC actions flush action sample" 72 ] 73 }, 74 { 75 "id": "da69", 76 "name": "Add valid sample action with mandatory arguments and reclassify control action", 77 "category": [ 78 "actions", 79 "sample" 80 ], 81 "setup": [ 82 [ 83 "$TC actions flush action sample", 84 0, 85 1, 86 255 87 ] 88 ], 89 "cmdUnderTest": "$TC actions add action sample rate 20000 group 72 reclassify index 100", 90 "expExitCode": "0", 91 "verifyCmd": "$TC actions list action sample", 92 "matchPattern": "action order [0-9]+: sample rate 1/20000 group 72 reclassify.*index 100 ref", 93 "matchCount": "1", 94 "teardown": [ 95 "$TC actions flush action sample" 96 ] 97 }, 98 { 99 "id": "13ce", 100 "name": "Add valid sample action with mandatory arguments and pipe control action", 101 "category": [ 102 "actions", 103 "sample" 104 ], 105 "setup": [ 106 [ 107 "$TC actions flush action sample", 108 0, 109 1, 110 255 111 ] 112 ], 113 "cmdUnderTest": "$TC actions add action sample rate 20 group 2 pipe index 100", 114 "expExitCode": "0", 115 "verifyCmd": "$TC actions list action sample", 116 "matchPattern": "action order [0-9]+: sample rate 1/20 group 2 pipe.*index 100 ref", 117 "matchCount": "1", 118 "teardown": [ 119 "$TC actions flush action sample" 120 ] 121 }, 122 { 123 "id": "1886", 124 "name": "Add valid sample action with mandatory arguments and jump control action", 125 "category": [ 126 "actions", 127 "sample" 128 ], 129 "setup": [ 130 [ 131 "$TC actions flush action sample", 132 0, 133 1, 134 255 135 ] 136 ], 137 "cmdUnderTest": "$TC actions add action sample rate 700 group 25 jump 4 index 200", 138 "expExitCode": "0", 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", 141 "matchCount": "1", 142 "teardown": [ 143 "$TC actions flush action sample" 144 ] 145 }, 146 { 147 "id": "b6d4", 148 "name": "Add sample action with mandatory arguments and invalid control action", 149 "category": [ 150 "actions", 151 "sample" 152 ], 153 "setup": [ 154 [ 155 "$TC actions flush action sample", 156 0, 157 1, 158 255 159 ] 160 ], 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", 165 "matchCount": "0", 166 "teardown": [] 167 }, 168 { 169 "id": "a874", 170 "name": "Add invalid sample action without mandatory arguments", 171 "category": [ 172 "actions", 173 "sample" 174 ], 175 "setup": [ 176 [ 177 "$TC actions flush action sample", 178 0, 179 1, 180 255 181 ] 182 ], 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", 187 "matchCount": "0", 188 "teardown": [] 189 }, 190 { 191 "id": "ac01", 192 "name": "Add invalid sample action without mandatory argument rate", 193 "category": [ 194 "actions", 195 "sample" 196 ], 197 "setup": [ 198 [ 199 "$TC actions flush action sample", 200 0, 201 1, 202 255 203 ] 204 ], 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", 209 "matchCount": "0", 210 "teardown": [] 211 }, 212 { 213 "id": "4203", 214 "name": "Add invalid sample action without mandatory argument group", 215 "category": [ 216 "actions", 217 "sample" 218 ], 219 "setup": [ 220 [ 221 "$TC actions flush action sample", 222 0, 223 1, 224 255 225 ] 226 ], 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", 231 "matchCount": "0", 232 "teardown": [] 233 }, 234 { 235 "id": "14a7", 236 "name": "Add invalid sample action without mandatory argument group", 237 "category": [ 238 "actions", 239 "sample" 240 ], 241 "setup": [ 242 [ 243 "$TC actions flush action sample", 244 0, 245 1, 246 255 247 ] 248 ], 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", 253 "matchCount": "0", 254 "teardown": [] 255 }, 256 { 257 "id": "8f2e", 258 "name": "Add valid sample action with trunc argument", 259 "category": [ 260 "actions", 261 "sample" 262 ], 263 "setup": [ 264 [ 265 "$TC actions flush action sample", 266 0, 267 1, 268 255 269 ] 270 ], 271 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 trunc 1024 index 10", 272 "expExitCode": "0", 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", 275 "matchCount": "1", 276 "teardown": [ 277 "$TC actions flush action sample" 278 ] 279 }, 280 { 281 "id": "45f8", 282 "name": "Add sample action with maximum rate argument", 283 "category": [ 284 "actions", 285 "sample" 286 ], 287 "setup": [ 288 [ 289 "$TC actions flush action sample", 290 0, 291 1, 292 255 293 ] 294 ], 295 "cmdUnderTest": "$TC actions add action sample rate 4294967295 group 4 index 10", 296 "expExitCode": "0", 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", 299 "matchCount": "1", 300 "teardown": [ 301 "$TC actions flush action sample" 302 ] 303 }, 304 { 305 "id": "ad0c", 306 "name": "Add sample action with maximum trunc argument", 307 "category": [ 308 "actions", 309 "sample" 310 ], 311 "setup": [ 312 [ 313 "$TC actions flush action sample", 314 0, 315 1, 316 255 317 ] 318 ], 319 "cmdUnderTest": "$TC actions add action sample rate 16000 group 4 trunc 4294967295 index 10", 320 "expExitCode": "0", 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", 323 "matchCount": "1", 324 "teardown": [ 325 "$TC actions flush action sample" 326 ] 327 }, 328 { 329 "id": "83a9", 330 "name": "Add sample action with maximum group argument", 331 "category": [ 332 "actions", 333 "sample" 334 ], 335 "setup": [ 336 [ 337 "$TC actions flush action sample", 338 0, 339 1, 340 255 341 ] 342 ], 343 "cmdUnderTest": "$TC actions add action sample rate 4294 group 4294967295 index 1", 344 "expExitCode": "0", 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", 347 "matchCount": "1", 348 "teardown": [ 349 "$TC actions flush action sample" 350 ] 351 }, 352 { 353 "id": "ed27", 354 "name": "Add sample action with invalid rate argument", 355 "category": [ 356 "actions", 357 "sample" 358 ], 359 "setup": [ 360 [ 361 "$TC actions flush action sample", 362 0, 363 1, 364 255 365 ] 366 ], 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", 371 "matchCount": "0", 372 "teardown": [] 373 }, 374 { 375 "id": "2eae", 376 "name": "Add sample action with invalid group argument", 377 "category": [ 378 "actions", 379 "sample" 380 ], 381 "setup": [ 382 [ 383 "$TC actions flush action sample", 384 0, 385 1, 386 255 387 ] 388 ], 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", 393 "matchCount": "0", 394 "teardown": [] 395 }, 396 { 397 "id": "6ff3", 398 "name": "Add sample action with invalid trunc size", 399 "category": [ 400 "actions", 401 "sample" 402 ], 403 "setup": [ 404 [ 405 "$TC actions flush action sample", 406 0, 407 1, 408 255 409 ] 410 ], 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", 415 "matchCount": "0", 416 "teardown": [] 417 }, 418 { 419 "id": "2b2a", 420 "name": "Add sample action with invalid index", 421 "category": [ 422 "actions", 423 "sample" 424 ], 425 "setup": [ 426 [ 427 "$TC actions flush action sample", 428 0, 429 1, 430 255 431 ] 432 ], 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", 437 "matchCount": "0", 438 "teardown": [] 439 }, 440 { 441 "id": "dee2", 442 "name": "Add sample action with maximum allowed index", 443 "category": [ 444 "actions", 445 "sample" 446 ], 447 "setup": [ 448 [ 449 "$TC actions flush action sample", 450 0, 451 1, 452 255 453 ] 454 ], 455 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 index 4294967295", 456 "expExitCode": "0", 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", 459 "matchCount": "1", 460 "teardown": [ 461 "$TC actions flush action sample" 462 ] 463 }, 464 { 465 "id": "560e", 466 "name": "Add sample action with cookie", 467 "category": [ 468 "actions", 469 "sample" 470 ], 471 "setup": [ 472 [ 473 "$TC actions flush action sample", 474 0, 475 1, 476 255 477 ] 478 ], 479 "cmdUnderTest": "$TC actions add action sample rate 1024 group 4 index 45 cookie aabbccdd", 480 "expExitCode": "0", 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", 483 "matchCount": "1", 484 "teardown": [ 485 "$TC actions flush action sample" 486 ] 487 }, 488 { 489 "id": "704a", 490 "name": "Replace existing sample action with new rate argument", 491 "category": [ 492 "actions", 493 "sample" 494 ], 495 "setup": [ 496 [ 497 "$TC actions flush action sample", 498 0, 499 1, 500 255 501 ], 502 "$TC actions add action sample rate 1024 group 4 index 4" 503 ], 504 "cmdUnderTest": "$TC actions replace action sample rate 2048 group 4 index 4", 505 "expExitCode": "0", 506 "verifyCmd": "$TC actions list action sample", 507 "matchPattern": "action order [0-9]+: sample rate 1/2048 group 4 pipe.*index 4", 508 "matchCount": "1", 509 "teardown": [ 510 "$TC actions flush action sample" 511 ] 512 }, 513 { 514 "id": "60eb", 515 "name": "Replace existing sample action with new group argument", 516 "category": [ 517 "actions", 518 "sample" 519 ], 520 "setup": [ 521 [ 522 "$TC actions flush action sample", 523 0, 524 1, 525 255 526 ], 527 "$TC actions add action sample rate 1024 group 4 index 4" 528 ], 529 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 index 4", 530 "expExitCode": "0", 531 "verifyCmd": "$TC actions list action sample", 532 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 7 pipe.*index 4", 533 "matchCount": "1", 534 "teardown": [ 535 "$TC actions flush action sample" 536 ] 537 }, 538 { 539 "id": "2cce", 540 "name": "Replace existing sample action with new trunc argument", 541 "category": [ 542 "actions", 543 "sample" 544 ], 545 "setup": [ 546 [ 547 "$TC actions flush action sample", 548 0, 549 1, 550 255 551 ], 552 "$TC actions add action sample rate 1024 group 4 trunc 48 index 4" 553 ], 554 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 trunc 64 index 4", 555 "expExitCode": "0", 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", 558 "matchCount": "1", 559 "teardown": [ 560 "$TC actions flush action sample" 561 ] 562 }, 563 { 564 "id": "59d1", 565 "name": "Replace existing sample action with new control argument", 566 "category": [ 567 "actions", 568 "sample" 569 ], 570 "setup": [ 571 [ 572 "$TC actions flush action sample", 573 0, 574 1, 575 255 576 ], 577 "$TC actions add action sample rate 1024 group 4 reclassify index 4" 578 ], 579 "cmdUnderTest": "$TC actions replace action sample rate 1024 group 7 pipe index 4", 580 "expExitCode": "0", 581 "verifyCmd": "$TC actions list action sample", 582 "matchPattern": "action order [0-9]+: sample rate 1/1024 group 7 pipe.*index 4", 583 "matchCount": "1", 584 "teardown": [ 585 "$TC actions flush action sample" 586 ] 587 } 588] 589