Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'net-tc-testing-new-tests'

Zhengchao Shao says:

====================
net: add tc-testing test cases

For this patchset, test cases of the ctinfo, gate, and xt action modules
are added to the tc-testing test suite. Also add deleting test for
connmark, ife, nat, sample and tunnel_key action modules.

After a test case is added locally, the test result is as follows:

./tdc.py -c action ctinfo
considering category action
considering category ctinfo
Test c826: Add ctinfo action with default setting
Test 0286: Add ctinfo action with dscp
Test 4938: Add ctinfo action with valid cpmark and zone
Test 7593: Add ctinfo action with drop control
Test 2961: Replace ctinfo action zone and action control
Test e567: Delete ctinfo action with valid index
Test 6a91: Delete ctinfo action with invalid index
Test 5232: List ctinfo actions
Test 7702: Flush ctinfo actions
Test 3201: Add ctinfo action with duplicate index
Test 8295: Add ctinfo action with invalid index
Test 3964: Replace ctinfo action with invalid goto_chain control

All test results:

1..12
ok 1 c826 - Add ctinfo action with default setting
ok 2 0286 - Add ctinfo action with dscp
ok 3 4938 - Add ctinfo action with valid cpmark and zone
ok 4 7593 - Add ctinfo action with drop control
ok 5 2961 - Replace ctinfo action zone and action control
ok 6 e567 - Delete ctinfo action with valid index
ok 7 6a91 - Delete ctinfo action with invalid index
ok 8 5232 - List ctinfo actions
ok 9 7702 - Flush ctinfo actions
ok 10 3201 - Add ctinfo action with duplicate index
ok 11 8295 - Add ctinfo action with invalid index
ok 12 3964 - Replace ctinfo action with invalid goto_chain control

./tdc.py -c action gate
considering category gate
considering category action
Test 5153: Add gate action with priority and sched-entry
Test 7189: Add gate action with base-time
Test a721: Add gate action with cycle-time
Test c029: Add gate action with cycle-time-ext
Test 3719: Replace gate base-time action
Test d821: Delete gate action with valid index
Test 3128: Delete gate action with invalid index
Test 7837: List gate actions
Test 9273: Flush gate actions
Test c829: Add gate action with duplicate index
Test 3043: Add gate action with invalid index
Test 2930: Add gate action with cookie

All test results:

1..12
ok 1 5153 - Add gate action with priority and sched-entry
ok 2 7189 - Add gate action with base-time
ok 3 a721 - Add gate action with cycle-time
ok 4 c029 - Add gate action with cycle-time-ext
ok 5 3719 - Replace gate base-time action
ok 6 d821 - Delete gate action with valid index
ok 7 3128 - Delete gate action with invalid index
ok 8 7837 - List gate actions
ok 9 9273 - Flush gate actions
ok 10 c829 - Add gate action with duplicate index
ok 11 3043 - Add gate action with invalid index
ok 12 2930 - Add gate action with cookie

./tdc.py -c action xt
considering category xt
considering category action
Test 2029: Add xt action with log-prefix
Test 3562: Replace xt action log-prefix
Test 8291: Delete xt action with valid index
Test 5169: Delete xt action with invalid index
Test 7284: List xt actions
Test 5010: Flush xt actions
Test 8437: Add xt action with duplicate index
Test 2837: Add xt action with invalid index

All test results:

1..8
ok 1 2029 - Add xt action with log-prefix
ok 2 3562 - Replace xt action log-prefix
ok 3 8291 - Delete xt action with valid index
ok 4 5169 - Delete xt action with invalid index
ok 5 7284 - List xt actions
ok 6 5010 - Flush xt actions
ok 7 8437 - Add xt action with duplicate index
ok 8 2837 - Add xt action with invalid index

./tdc.py -c action connmark
considering category action
considering category connmark
Test 2002: Add valid connmark action with defaults
Test 56a5: Add valid connmark action with control pass
Test 7c66: Add valid connmark action with control drop
Test a913: Add valid connmark action with control pipe
Test bdd8: Add valid connmark action with control reclassify
Test b8be: Add valid connmark action with control continue
Test d8a6: Add valid connmark action with control jump
Test aae8: Add valid connmark action with zone argument
Test 2f0b: Add valid connmark action with invalid zone argument
Test 9305: Add connmark action with unsupported argument
Test 71ca: Add valid connmark action and replace it
Test 5f8f: Add valid connmark action with cookie
Test c506: Replace connmark with invalid goto chain control
Test 6571: Delete connmark action with valid index
Test 3426: Delete connmark action with invalid index

All test results:

1..15
ok 1 2002 - Add valid connmark action with defaults
ok 2 56a5 - Add valid connmark action with control pass
ok 3 7c66 - Add valid connmark action with control drop
ok 4 a913 - Add valid connmark action with control pipe
ok 5 bdd8 - Add valid connmark action with control reclassify
ok 6 b8be - Add valid connmark action with control continue
ok 7 d8a6 - Add valid connmark action with control jump
ok 8 aae8 - Add valid connmark action with zone argument
ok 9 2f0b - Add valid connmark action with invalid zone argument
ok 10 9305 - Add connmark action with unsupported argument
ok 11 71ca - Add valid connmark action and replace it
ok 12 5f8f - Add valid connmark action with cookie
ok 13 c506 - Replace connmark with invalid goto chain control
ok 14 6571 - Delete connmark action with valid index
ok 15 3426 - Delete connmark action with invalid index

./tdc.py -c action ife
considering category action
considering category ife
Test 7682: Create valid ife encode action with mark and pass control
Test ef47: Create valid ife encode action with mark and pipe control
Test df43: Create valid ife encode action with mark and continue control
Test e4cf: Create valid ife encode action with mark and drop control
Test ccba: Create valid ife encode action with mark and reclassify control
Test a1cf: Create valid ife encode action with mark and jump control
Test cb3d: Create valid ife encode action with mark value at 32-bit
maximum
Test 1efb: Create ife encode action with mark value exceeding 32-bit
maximum
Test 95ed: Create valid ife encode action with prio and pass control
Test aa17: Create valid ife encode action with prio and pipe control
Test 74c7: Create valid ife encode action with prio and continue control
Test 7a97: Create valid ife encode action with prio and drop control
Test f66b: Create valid ife encode action with prio and reclassify control
Test 3056: Create valid ife encode action with prio and jump control
Test 7dd3: Create valid ife encode action with prio value at 32-bit
maximum
Test 2ca1: Create ife encode action with prio value exceeding 32-bit
maximum
Test 05bb: Create valid ife encode action with tcindex and pass control
Test ce65: Create valid ife encode action with tcindex and pipe control
Test 09cd: Create valid ife encode action with tcindex and continue control
Test 8eb5: Create valid ife encode action with tcindex and continue control
Test 451a: Create valid ife encode action with tcindex and drop control
Test d76c: Create valid ife encode action with tcindex and reclassify
control
Test e731: Create valid ife encode action with tcindex and jump control
Test b7b8: Create valid ife encode action with tcindex value at 16-bit
maximum
Test d0d8: Create ife encode action with tcindex value exceeding 16-bit
maximum
Test 2a9c: Create valid ife encode action with mac src parameter
Test cf5c: Create valid ife encode action with mac dst parameter
Test 2353: Create valid ife encode action with mac src and mac dst
parameters
Test 552c: Create valid ife encode action with mark and type parameters
Test 0421: Create valid ife encode action with prio and type parameters
Test 4017: Create valid ife encode action with tcindex and type parameters
Test fac3: Create valid ife encode action with index at 32-bit maximum
Test 7c25: Create valid ife decode action with pass control
Test dccb: Create valid ife decode action with pipe control
Test 7bb9: Create valid ife decode action with continue control
Test d9ad: Create valid ife decode action with drop control
Test 219f: Create valid ife decode action with reclassify control
Test 8f44: Create valid ife decode action with jump control
Test 56cf: Create ife encode action with index exceeding 32-bit maximum
Test ee94: Create ife encode action with invalid control
Test b330: Create ife encode action with cookie
Test bbc0: Create ife encode action with invalid argument
Test d54a: Create ife encode action with invalid type argument
Test 7ee0: Create ife encode action with invalid mac src argument
Test 0a7d: Create ife encode action with invalid mac dst argument
Test a0e2: Replace ife encode action with invalid goto chain control
Test a972: Delete ife encode action with valid index
Test 1272: Delete ife encode action with invalid index

All test results:

1..48
ok 1 7682 - Create valid ife encode action with mark and pass control
ok 2 ef47 - Create valid ife encode action with mark and pipe control
ok 3 df43 - Create valid ife encode action with mark and continue control
ok 4 e4cf - Create valid ife encode action with mark and drop control
ok 5 ccba - Create valid ife encode action with mark and reclassify
control
ok 6 a1cf - Create valid ife encode action with mark and jump control
ok 7 cb3d - Create valid ife encode action with mark value at 32-bit
maximum
ok 8 1efb - Create ife encode action with mark value exceeding 32-bit
maximum
ok 9 95ed - Create valid ife encode action with prio and pass control
ok 10 aa17 - Create valid ife encode action with prio and pipe control
ok 11 74c7 - Create valid ife encode action with prio and continue control
ok 12 7a97 - Create valid ife encode action with prio and drop control
ok 13 f66b - Create valid ife encode action with prio and reclassify
control
ok 14 3056 - Create valid ife encode action with prio and jump control
ok 15 7dd3 - Create valid ife encode action with prio value at 32-bit
maximum
ok 16 2ca1 - Create ife encode action with prio value exceeding 32-bit
maximum
ok 17 05bb - Create valid ife encode action with tcindex and pass control
ok 18 ce65 - Create valid ife encode action with tcindex and pipe control
ok 19 09cd - Create valid ife encode action with tcindex and continue
control
ok 20 8eb5 - Create valid ife encode action with tcindex and continue
control
ok 21 451a - Create valid ife encode action with tcindex and drop control
ok 22 d76c - Create valid ife encode action with tcindex and reclassify
control
ok 23 e731 - Create valid ife encode action with tcindex and jump control
ok 24 b7b8 - Create valid ife encode action with tcindex value at 16-bit
maximum
ok 25 d0d8 - Create ife encode action with tcindex value exceeding 16-bit
maximum
ok 26 2a9c - Create valid ife encode action with mac src parameter
ok 27 cf5c - Create valid ife encode action with mac dst parameter
ok 28 2353 - Create valid ife encode action with mac src and mac dst
parameters
ok 29 552c - Create valid ife encode action with mark and type parameters
ok 30 0421 - Create valid ife encode action with prio and type parameters
ok 31 4017 - Create valid ife encode action with tcindex and type
parameters
ok 32 fac3 - Create valid ife encode action with index at 32-bit maximum
ok 33 7c25 - Create valid ife decode action with pass control
ok 34 dccb - Create valid ife decode action with pipe control
ok 35 7bb9 - Create valid ife decode action with continue control
ok 36 d9ad - Create valid ife decode action with drop control
ok 37 219f - Create valid ife decode action with reclassify control
ok 38 8f44 - Create valid ife decode action with jump control
ok 39 56cf - Create ife encode action with index exceeding 32-bit maximum
ok 40 ee94 - Create ife encode action with invalid control
ok 41 b330 - Create ife encode action with cookie
ok 42 bbc0 - Create ife encode action with invalid argument
ok 43 d54a - Create ife encode action with invalid type argument
ok 44 7ee0 - Create ife encode action with invalid mac src argument
ok 45 0a7d - Create ife encode action with invalid mac dst argument
ok 46 a0e2 - Replace ife encode action with invalid goto chain control
ok 47 a972 - Delete ife encode action with valid index
ok 48 1272 - Delete ife encode action with invalid index

./tdc.py -c action nat
considering category action
considering category nat
Test 7565: Add nat action on ingress with default control action
Test fd79: Add nat action on ingress with pipe control action
Test eab9: Add nat action on ingress with continue control action
Test c53a: Add nat action on ingress with reclassify control action
Test 76c9: Add nat action on ingress with jump control action
Test 24c6: Add nat action on ingress with drop control action
Test 2120: Add nat action on ingress with maximum index value
Test 3e9d: Add nat action on ingress with invalid index value
Test f6c9: Add nat action on ingress with invalid IP address
Test be25: Add nat action on ingress with invalid argument
Test a7bd: Add nat action on ingress with DEFAULT IP address
Test ee1e: Add nat action on ingress with ANY IP address
Test 1de8: Add nat action on ingress with ALL IP address
Test 8dba: Add nat action on egress with default control action
Test 19a7: Add nat action on egress with pipe control action
Test f1d9: Add nat action on egress with continue control action
Test 6d4a: Add nat action on egress with reclassify control action
Test b313: Add nat action on egress with jump control action
Test d9fc: Add nat action on egress with drop control action
Test a895: Add nat action on egress with DEFAULT IP address
Test 2572: Add nat action on egress with ANY IP address
Test 37f3: Add nat action on egress with ALL IP address
Test 6054: Add nat action on egress with cookie
Test 79d6: Add nat action on ingress with cookie
Test 4b12: Replace nat action with invalid goto chain control
Test b811: Delete nat action with valid index
Test a521: Delete nat action with invalid index

All test results:

1..27
ok 1 7565 - Add nat action on ingress with default control action
ok 2 fd79 - Add nat action on ingress with pipe control action
ok 3 eab9 - Add nat action on ingress with continue control action
ok 4 c53a - Add nat action on ingress with reclassify control action
ok 5 76c9 - Add nat action on ingress with jump control action
ok 6 24c6 - Add nat action on ingress with drop control action
ok 7 2120 - Add nat action on ingress with maximum index value
ok 8 3e9d - Add nat action on ingress with invalid index value
ok 9 f6c9 - Add nat action on ingress with invalid IP address
ok 10 be25 - Add nat action on ingress with invalid argument
ok 11 a7bd - Add nat action on ingress with DEFAULT IP address
ok 12 ee1e - Add nat action on ingress with ANY IP address
ok 13 1de8 - Add nat action on ingress with ALL IP address
ok 14 8dba - Add nat action on egress with default control action
ok 15 19a7 - Add nat action on egress with pipe control action
ok 16 f1d9 - Add nat action on egress with continue control action
ok 17 6d4a - Add nat action on egress with reclassify control action
ok 18 b313 - Add nat action on egress with jump control action
ok 19 d9fc - Add nat action on egress with drop control action
ok 20 a895 - Add nat action on egress with DEFAULT IP address
ok 21 2572 - Add nat action on egress with ANY IP address
ok 22 37f3 - Add nat action on egress with ALL IP address
ok 23 6054 - Add nat action on egress with cookie
ok 24 79d6 - Add nat action on ingress with cookie
ok 25 4b12 - Replace nat action with invalid goto chain control
ok 26 b811 - Delete nat action with valid index
ok 27 a521 - Delete nat action with invalid index

./tdc.py -c action sample
considering category action
considering category sample
Test 9784: Add valid sample action with mandatory arguments
Test 5c91: Add valid sample action with mandatory arguments and continue
control action
Test 334b: Add valid sample action with mandatory arguments and drop
control action
Test da69: Add valid sample action with mandatory arguments and reclassify
control action
Test 13ce: Add valid sample action with mandatory arguments and pipe
control action
Test 1886: Add valid sample action with mandatory arguments and jump
control action
Test 7571: Add sample action with invalid rate
Test b6d4: Add sample action with mandatory arguments and invalid control
action
Test a874: Add invalid sample action without mandatory arguments
Test ac01: Add invalid sample action without mandatory argument rate
Test 4203: Add invalid sample action without mandatory argument group
Test 14a7: Add invalid sample action without mandatory argument group
Test 8f2e: Add valid sample action with trunc argument
Test 45f8: Add sample action with maximum rate argument
Test ad0c: Add sample action with maximum trunc argument
Test 83a9: Add sample action with maximum group argument
Test ed27: Add sample action with invalid rate argument
Test 2eae: Add sample action with invalid group argument
Test 6ff3: Add sample action with invalid trunc size
Test 2b2a: Add sample action with invalid index
Test dee2: Add sample action with maximum allowed index
Test 560e: Add sample action with cookie
Test 704a: Replace existing sample action with new rate argument
Test 60eb: Replace existing sample action with new group argument
Test 2cce: Replace existing sample action with new trunc argument
Test 59d1: Replace existing sample action with new control argument
Test 0a6e: Replace sample action with invalid goto chain control
Test 3872: Delete sample action with valid index
Test a394: Delete sample action with invalid index

All test results:

1..29
ok 1 9784 - Add valid sample action with mandatory arguments
ok 2 5c91 - Add valid sample action with mandatory arguments and continue
control action
ok 3 334b - Add valid sample action with mandatory arguments and drop
control action
ok 4 da69 - Add valid sample action with mandatory arguments and
reclassify control action
ok 5 13ce - Add valid sample action with mandatory arguments and pipe
control action
ok 6 1886 - Add valid sample action with mandatory arguments and jump
control action
ok 7 7571 - Add sample action with invalid rate
ok 8 b6d4 - Add sample action with mandatory arguments and invalid control
action
ok 9 a874 - Add invalid sample action without mandatory arguments
ok 10 ac01 - Add invalid sample action without mandatory argument rate
ok 11 4203 - Add invalid sample action without mandatory argument group
ok 12 14a7 - Add invalid sample action without mandatory argument group
ok 13 8f2e - Add valid sample action with trunc argument
ok 14 45f8 - Add sample action with maximum rate argument
ok 15 ad0c - Add sample action with maximum trunc argument
ok 16 83a9 - Add sample action with maximum group argument
ok 17 ed27 - Add sample action with invalid rate argument
ok 18 2eae - Add sample action with invalid group argument
ok 19 6ff3 - Add sample action with invalid trunc size
ok 20 2b2a - Add sample action with invalid index
ok 21 dee2 - Add sample action with maximum allowed index
ok 22 560e - Add sample action with cookie
ok 23 704a - Replace existing sample action with new rate argument
ok 24 60eb - Replace existing sample action with new group argument
ok 25 2cce - Replace existing sample action with new trunc argument
ok 26 59d1 - Replace existing sample action with new control argument
ok 27 0a6e - Replace sample action with invalid goto chain control
ok 28 3872 - Delete sample action with valid index
ok 29 a394 - Delete sample action with invalid index

./tdc.py -c action tunnel_key
considering category tunnel_key
considering category action
Test 2b11: Add tunnel_key set action with mandatory parameters
Test dc6b: Add tunnel_key set action with missing mandatory src_ip
parameter
Test 7f25: Add tunnel_key set action with missing mandatory dst_ip
parameter
Test a5e0: Add tunnel_key set action with invalid src_ip parameter
Test eaa8: Add tunnel_key set action with invalid dst_ip parameter
Test 3b09: Add tunnel_key set action with invalid id parameter
Test 9625: Add tunnel_key set action with invalid dst_port parameter
Test 05af: Add tunnel_key set action with optional dst_port parameter
Test da80: Add tunnel_key set action with index at 32-bit maximum
Test d407: Add tunnel_key set action with index exceeding 32-bit maximum
Test 5cba: Add tunnel_key set action with id value at 32-bit maximum
Test e84a: Add tunnel_key set action with id value exceeding 32-bit
maximum
Test 9c19: Add tunnel_key set action with dst_port value at 16-bit maximum
Test 3bd9: Add tunnel_key set action with dst_port value exceeding 16-bit
maximum
Test 68e2: Add tunnel_key unset action
Test 6192: Add tunnel_key unset continue action
Test 061d: Add tunnel_key set continue action with cookie
Test 8acb: Add tunnel_key set continue action with invalid cookie
Test a07e: Add tunnel_key action with no set/unset command specified
Test b227: Add tunnel_key action with csum option
Test 58a7: Add tunnel_key action with nocsum option
Test 2575: Add tunnel_key action with not-supported parameter
Test 7a88: Add tunnel_key action with cookie parameter
Test 4f20: Add tunnel_key action with a single geneve option parameter
Test e33d: Add tunnel_key action with multiple geneve options parameter
Test 0778: Add tunnel_key action with invalid class geneve option
parameter
Test 4ae8: Add tunnel_key action with invalid type geneve option parameter
Test 4039: Add tunnel_key action with short data length geneve option
parameter
Test 26a6: Add tunnel_key action with non-multiple of 4 data length geneve
option parameter
Test f44d: Add tunnel_key action with incomplete geneve options parameter
Test 7afc: Replace tunnel_key set action with all parameters
Test 364d: Replace tunnel_key set action with all parameters and cookie
Test 937c: Fetch all existing tunnel_key actions
Test 6783: Flush all existing tunnel_key actions
Test 8242: Replace tunnel_key set action with invalid goto chain
Test 0cd2: Add tunnel_key set action with no_percpu flag
Test 3671: Delete tunnel_key set action with valid index
Test 8597: Delete tunnel_key set action with invalid index

All test results:

1..38
ok 1 2b11 - Add tunnel_key set action with mandatory parameters
ok 2 dc6b - Add tunnel_key set action with missing mandatory src_ip
parameter
ok 3 7f25 - Add tunnel_key set action with missing mandatory dst_ip
parameter
ok 4 a5e0 - Add tunnel_key set action with invalid src_ip parameter
ok 5 eaa8 - Add tunnel_key set action with invalid dst_ip parameter
ok 6 3b09 - Add tunnel_key set action with invalid id parameter
ok 7 9625 - Add tunnel_key set action with invalid dst_port parameter
ok 8 05af - Add tunnel_key set action with optional dst_port parameter
ok 9 da80 - Add tunnel_key set action with index at 32-bit maximum
ok 10 d407 - Add tunnel_key set action with index exceeding 32-bit maximum
ok 11 5cba - Add tunnel_key set action with id value at 32-bit maximum
ok 12 e84a - Add tunnel_key set action with id value exceeding 32-bit
maximum
ok 13 9c19 - Add tunnel_key set action with dst_port value at 16-bit
maximum
ok 14 3bd9 - Add tunnel_key set action with dst_port value exceeding
16-bit maximum
ok 15 68e2 - Add tunnel_key unset action
ok 16 6192 - Add tunnel_key unset continue action
ok 17 061d - Add tunnel_key set continue action with cookie
ok 18 8acb - Add tunnel_key set continue action with invalid cookie
ok 19 a07e - Add tunnel_key action with no set/unset command specified
ok 20 b227 - Add tunnel_key action with csum option
ok 21 58a7 - Add tunnel_key action with nocsum option
ok 22 2575 - Add tunnel_key action with not-supported parameter
ok 23 7a88 - Add tunnel_key action with cookie parameter
ok 24 4f20 - Add tunnel_key action with a single geneve option parameter
ok 25 e33d - Add tunnel_key action with multiple geneve options parameter
ok 26 0778 - Add tunnel_key action with invalid class geneve option
parameter
ok 27 4ae8 - Add tunnel_key action with invalid type geneve option
parameter
ok 28 4039 - Add tunnel_key action with short data length geneve option
parameter
ok 29 26a6 - Add tunnel_key action with non-multiple of 4 data length
geneve option parameter
ok 30 f44d - Add tunnel_key action with incomplete geneve options
parameter
ok 31 7afc - Replace tunnel_key set action with all parameters
ok 32 364d - Replace tunnel_key set action with all parameters and cookie
ok 33 937c - Fetch all existing tunnel_key actions
ok 34 6783 - Flush all existing tunnel_key actions
ok 35 8242 - Replace tunnel_key set action with invalid goto chain
ok 36 0cd2 - Add tunnel_key set action with no_percpu flag
ok 37 3671 - Delete tunnel_key set action with valid index
ok 38 8597 - Delete tunnel_key set action with invalid index
====================

Reviewed-by: Victor Nogueira <victor@mojatatu.com>
Tested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

+1100
+50
tools/testing/selftests/tc-testing/tc-tests/actions/connmark.json
··· 312 312 "teardown": [ 313 313 "$TC actions flush action connmark" 314 314 ] 315 + }, 316 + { 317 + "id": "6571", 318 + "name": "Delete connmark action with valid index", 319 + "category": [ 320 + "actions", 321 + "connmark" 322 + ], 323 + "setup": [ 324 + [ 325 + "$TC actions flush action connmark", 326 + 0, 327 + 1, 328 + 255 329 + ], 330 + "$TC actions add action connmark pass index 20" 331 + ], 332 + "cmdUnderTest": "$TC actions del action connmark index 20", 333 + "expExitCode": "0", 334 + "verifyCmd": "$TC actions get action connmark index 20", 335 + "matchPattern": "action order [0-9]+: connmark zone 0 pass.*index 20 ref", 336 + "matchCount": "0", 337 + "teardown": [ 338 + "$TC actions flush action connmark" 339 + ] 340 + }, 341 + { 342 + "id": "3426", 343 + "name": "Delete connmark action with invalid index", 344 + "category": [ 345 + "actions", 346 + "connmark" 347 + ], 348 + "setup": [ 349 + [ 350 + "$TC actions flush action connmark", 351 + 0, 352 + 1, 353 + 255 354 + ], 355 + "$TC actions add action connmark pass index 20" 356 + ], 357 + "cmdUnderTest": "$TC actions del action connmark index 1", 358 + "expExitCode": "255", 359 + "verifyCmd": "$TC actions get action connmark index 20", 360 + "matchPattern": "action order [0-9]+: connmark zone 0 pass.*index 20 ref", 361 + "matchCount": "1", 362 + "teardown": [ 363 + "$TC actions flush action connmark" 364 + ] 315 365 } 316 366 ]
+316
tools/testing/selftests/tc-testing/tc-tests/actions/ctinfo.json
··· 1 + [ 2 + { 3 + "id": "c826", 4 + "name": "Add ctinfo action with default setting", 5 + "category": [ 6 + "actions", 7 + "ctinfo" 8 + ], 9 + "setup": [ 10 + [ 11 + "$TC action flush action ctinfo", 12 + 0, 13 + 1, 14 + 255 15 + ] 16 + ], 17 + "cmdUnderTest": "$TC action add action ctinfo index 10", 18 + "expExitCode": "0", 19 + "verifyCmd": "$TC action get action ctinfo index 10", 20 + "matchPattern": "action order [0-9]*: ctinfo zone 0 pipe.*index 10 ref", 21 + "matchCount": "1", 22 + "teardown": [ 23 + "$TC action flush action ctinfo" 24 + ] 25 + }, 26 + { 27 + "id": "0286", 28 + "name": "Add ctinfo action with dscp", 29 + "category": [ 30 + "actions", 31 + "ctinfo" 32 + ], 33 + "setup": [ 34 + [ 35 + "$TC actions flush action ctinfo", 36 + 0, 37 + 1, 38 + 255 39 + ] 40 + ], 41 + "cmdUnderTest": "$TC action add action ctinfo dscp 0xfc000000 0x01000000 index 100", 42 + "expExitCode": "0", 43 + "verifyCmd": "$TC action ls action ctinfo", 44 + "matchPattern": "action order [0-9]*: ctinfo zone 0 pipe.*index 100 ref.*dscp 0xfc000000 0x01000000", 45 + "matchCount": "1", 46 + "teardown": [ 47 + "$TC actions flush action ctinfo" 48 + ] 49 + }, 50 + { 51 + "id": "4938", 52 + "name": "Add ctinfo action with valid cpmark and zone", 53 + "category": [ 54 + "actions", 55 + "ctinfo" 56 + ], 57 + "setup": [ 58 + [ 59 + "$TC action flush action ctinfo", 60 + 0, 61 + 1, 62 + 255 63 + ] 64 + ], 65 + "cmdUnderTest": "$TC action add action ctinfo cpmark 0x01000000 zone 1 index 1", 66 + "expExitCode": "0", 67 + "verifyCmd": "$TC action get action ctinfo index 1", 68 + "matchPattern": "action order [0-9]*: ctinfo zone 1 pipe.*index 1 ref.*cpmark 0x01000000", 69 + "matchCount": "1", 70 + "teardown": [ 71 + "$TC action flush action ctinfo" 72 + ] 73 + }, 74 + { 75 + "id": "7593", 76 + "name": "Add ctinfo action with drop control", 77 + "category": [ 78 + "actions", 79 + "ctinfo" 80 + ], 81 + "setup": [ 82 + [ 83 + "$TC action flush action ctinfo", 84 + 0, 85 + 1, 86 + 255 87 + ] 88 + ], 89 + "cmdUnderTest": "$TC action add action ctinfo drop index 1000", 90 + "expExitCode": "0", 91 + "verifyCmd": "$TC action ls action ctinfo", 92 + "matchPattern": "action order [0-9]*: ctinfo zone 0 drop.*index 1000 ref", 93 + "matchCount": "1", 94 + "teardown": [ 95 + "$TC action flush action ctinfo" 96 + ] 97 + }, 98 + { 99 + "id": "2961", 100 + "name": "Replace ctinfo action zone and action control", 101 + "category": [ 102 + "actions", 103 + "ctinfo" 104 + ], 105 + "setup": [ 106 + [ 107 + "$TC actions flush action ctinfo", 108 + 0, 109 + 1, 110 + 255 111 + ], 112 + [ 113 + "$TC action add action ctinfo zone 1 drop index 1", 114 + 0, 115 + 1, 116 + 255 117 + ] 118 + ], 119 + "cmdUnderTest": "$TC action replace action ctinfo zone 200 pass index 1", 120 + "expExitCode": "0", 121 + "verifyCmd": "$TC action get action ctinfo index 1", 122 + "matchPattern": "action order [0-9]*: ctinfo zone 200 pass.*index 1 ref", 123 + "matchCount": "1", 124 + "teardown": [ 125 + "$TC action flush action ctinfo" 126 + ] 127 + }, 128 + { 129 + "id": "e567", 130 + "name": "Delete ctinfo action with valid index", 131 + "category": [ 132 + "actions", 133 + "ctinfo" 134 + ], 135 + "setup": [ 136 + [ 137 + "$TC actions flush action ctinfo", 138 + 0, 139 + 1, 140 + 255 141 + ], 142 + [ 143 + "$TC action add action ctinfo zone 200 pass index 1", 144 + 0, 145 + 1, 146 + 255 147 + ] 148 + ], 149 + "cmdUnderTest": "$TC action delete action ctinfo index 1", 150 + "expExitCode": "0", 151 + "verifyCmd": "$TC action get action ctinfo index 1", 152 + "matchPattern": "action order [0-9]*: ctinfo zone 200 pass.*index 1 ref", 153 + "matchCount": "0", 154 + "teardown": [ 155 + "$TC action flush action ctinfo" 156 + ] 157 + }, 158 + { 159 + "id": "6a91", 160 + "name": "Delete ctinfo action with invalid index", 161 + "category": [ 162 + "actions", 163 + "ctinfo" 164 + ], 165 + "setup": [ 166 + [ 167 + "$TC actions flush action ctinfo", 168 + 0, 169 + 1, 170 + 255 171 + ], 172 + [ 173 + "$TC action add action ctinfo zone 200 pass index 1", 174 + 0, 175 + 1, 176 + 255 177 + ] 178 + ], 179 + "cmdUnderTest": "$TC action delete action ctinfo index 333", 180 + "expExitCode": "255", 181 + "verifyCmd": "$TC action get action ctinfo index 1", 182 + "matchPattern": "action order [0-9]*: ctinfo zone 200 pass.*index 1 ref", 183 + "matchCount": "1", 184 + "teardown": [ 185 + "$TC action flush action ctinfo" 186 + ] 187 + }, 188 + { 189 + "id": "5232", 190 + "name": "List ctinfo actions", 191 + "category": [ 192 + "actions", 193 + "ctinfo" 194 + ], 195 + "setup": [ 196 + [ 197 + "$TC action flush action ctinfo", 198 + 0, 199 + 1, 200 + 255 201 + ], 202 + "$TC action add action ctinfo zone 20 pass index 101", 203 + "$TC action add action ctinfo cpmark 0x02000000 drop index 102", 204 + "$TC action add action ctinfo continue index 103" 205 + ], 206 + "cmdUnderTest": "$TC action list action ctinfo", 207 + "expExitCode": "0", 208 + "verifyCmd": "$TC action list action ctinfo", 209 + "matchPattern": "action order [0-9]*: ctinfo", 210 + "matchCount": "3", 211 + "teardown": [ 212 + "$TC actions flush action ctinfo" 213 + ] 214 + }, 215 + { 216 + "id": "7702", 217 + "name": "Flush ctinfo actions", 218 + "category": [ 219 + "actions", 220 + "ctinfo" 221 + ], 222 + "setup": [ 223 + [ 224 + "$TC actions flush action ctinfo", 225 + 0, 226 + 1, 227 + 255 228 + ], 229 + "$TC action add action ctinfo zone 20 pass index 101", 230 + "$TC action add action ctinfo cpmark 0x02000000 drop index 102", 231 + "$TC action add action ctinfo continue index 103" 232 + ], 233 + "cmdUnderTest": "$TC action flush action ctinfo", 234 + "expExitCode": "0", 235 + "verifyCmd": "$TC action list action ctinfo", 236 + "matchPattern": "action order [0-9]*: ctinfo", 237 + "matchCount": "0", 238 + "teardown": [ 239 + "$TC actions flush action ctinfo" 240 + ] 241 + }, 242 + { 243 + "id": "3201", 244 + "name": "Add ctinfo action with duplicate index", 245 + "category": [ 246 + "actions", 247 + "ctinfo" 248 + ], 249 + "setup": [ 250 + [ 251 + "$TC actions flush action ctinfo", 252 + 0, 253 + 1, 254 + 255 255 + ], 256 + "$TC action add action ctinfo zone 20 pass index 101" 257 + ], 258 + "cmdUnderTest": "$TC action add action ctinfo cpmark 0x02000000 drop index 101", 259 + "expExitCode": "255", 260 + "verifyCmd": "$TC action get action ctinfo index 101", 261 + "matchPattern": "action order [0-9]*: ctinfo zone 20 pass.*index 101", 262 + "matchCount": "1", 263 + "teardown": [ 264 + "$TC action flush action ctinfo" 265 + ] 266 + }, 267 + { 268 + "id": "8295", 269 + "name": "Add ctinfo action with invalid index", 270 + "category": [ 271 + "actions", 272 + "ctinfo" 273 + ], 274 + "setup": [ 275 + [ 276 + "$TC actions flush action ctinfo", 277 + 0, 278 + 1, 279 + 255 280 + ] 281 + ], 282 + "cmdUnderTest": "$TC action add action ctinfo zone 20 index 4294967296", 283 + "expExitCode": "255", 284 + "verifyCmd": "$TC action ls action ctinfo", 285 + "matchPattern": "action order [0-9]*: ctinfo", 286 + "matchCount": "0", 287 + "teardown": [ 288 + "$TC action flush action ctinfo" 289 + ] 290 + }, 291 + { 292 + "id": "3964", 293 + "name": "Replace ctinfo action with invalid goto_chain control", 294 + "category": [ 295 + "actions", 296 + "ctinfo" 297 + ], 298 + "setup": [ 299 + [ 300 + "$TC actions flush action ctinfo", 301 + 0, 302 + 1, 303 + 255 304 + ], 305 + "$TC action add action ctinfo pass index 90" 306 + ], 307 + "cmdUnderTest": "$TC action replace action ctinfo goto chain 42 index 90", 308 + "expExitCode": "255", 309 + "verifyCmd": "$TC action list action ctinfo", 310 + "matchPattern": "action order [0-9]*: ctinfo.*pass.*index 90", 311 + "matchCount": "1", 312 + "teardown": [ 313 + "$TC action flush action ctinfo" 314 + ] 315 + } 316 + ]
+315
tools/testing/selftests/tc-testing/tc-tests/actions/gate.json
··· 1 + [ 2 + { 3 + "id": "5153", 4 + "name": "Add gate action with priority and sched-entry", 5 + "category": [ 6 + "actions", 7 + "gate" 8 + ], 9 + "setup": [ 10 + [ 11 + "$TC action flush action gate", 12 + 0, 13 + 1, 14 + 255 15 + ] 16 + ], 17 + "cmdUnderTest": "$TC action add action gate priority 1 sched-entry close 100000000ns index 100", 18 + "expExitCode": "0", 19 + "verifyCmd": "$TC action get action gate index 100", 20 + "matchPattern": "action order [0-9]*: .*priority 1.*index 100 ref", 21 + "matchCount": "1", 22 + "teardown": [ 23 + "$TC action flush action gate" 24 + ] 25 + }, 26 + { 27 + "id": "7189", 28 + "name": "Add gate action with base-time", 29 + "category": [ 30 + "actions", 31 + "gate" 32 + ], 33 + "setup": [ 34 + [ 35 + "$TC actions flush action gate", 36 + 0, 37 + 1, 38 + 255 39 + ] 40 + ], 41 + "cmdUnderTest": "$TC action add action gate base-time 200000000000ns sched-entry close 100000000ns index 10", 42 + "expExitCode": "0", 43 + "verifyCmd": "$TC action ls action gate", 44 + "matchPattern": "action order [0-9]*: .*base-time 200s.*index 10 ref", 45 + "matchCount": "1", 46 + "teardown": [ 47 + "$TC actions flush action gate" 48 + ] 49 + }, 50 + { 51 + "id": "a721", 52 + "name": "Add gate action with cycle-time", 53 + "category": [ 54 + "actions", 55 + "gate" 56 + ], 57 + "setup": [ 58 + [ 59 + "$TC action flush action gate", 60 + 0, 61 + 1, 62 + 255 63 + ] 64 + ], 65 + "cmdUnderTest": "$TC action add action gate cycle-time 200000000000ns sched-entry close 100000000ns index 1000", 66 + "expExitCode": "0", 67 + "verifyCmd": "$TC action ls action gate", 68 + "matchPattern": "action order [0-9]*: .*cycle-time 200s.*index 1000 ref", 69 + "matchCount": "1", 70 + "teardown": [ 71 + "$TC action flush action gate" 72 + ] 73 + }, 74 + { 75 + "id": "c029", 76 + "name": "Add gate action with cycle-time-ext", 77 + "category": [ 78 + "actions", 79 + "gate" 80 + ], 81 + "setup": [ 82 + [ 83 + "$TC action flush action gate", 84 + 0, 85 + 1, 86 + 255 87 + ] 88 + ], 89 + "cmdUnderTest": "$TC action add action gate cycle-time-ext 20000000000ns sched-entry close 100000000ns index 1000", 90 + "expExitCode": "0", 91 + "verifyCmd": "$TC action get action gate index 1000", 92 + "matchPattern": "action order [0-9]*: .*cycle-time-ext 20s.*index 1000 ref", 93 + "matchCount": "1", 94 + "teardown": [ 95 + "$TC action flush action gate" 96 + ] 97 + }, 98 + { 99 + "id": "3719", 100 + "name": "Replace gate base-time action", 101 + "category": [ 102 + "actions", 103 + "gate" 104 + ], 105 + "setup": [ 106 + [ 107 + "$TC actions flush action gate", 108 + 0, 109 + 1, 110 + 255 111 + ], 112 + [ 113 + "$TC action add action gate base-time 200000000000ns sched-entry open 200000000ns -1 8000000b index 20", 114 + 0, 115 + 1, 116 + 255 117 + ] 118 + ], 119 + "cmdUnderTest": "$TC action replace action gate base-time 400000000000ns index 20", 120 + "expExitCode": "0", 121 + "verifyCmd": "$TC action get action gate index 20", 122 + "matchPattern": "action order [0-9]*: .*base-time 400s.*index 20 ref", 123 + "matchCount": "1", 124 + "teardown": [ 125 + "$TC action flush action gate" 126 + ] 127 + }, 128 + { 129 + "id": "d821", 130 + "name": "Delete gate action with valid index", 131 + "category": [ 132 + "actions", 133 + "gate" 134 + ], 135 + "setup": [ 136 + [ 137 + "$TC actions flush action gate", 138 + 0, 139 + 1, 140 + 255 141 + ], 142 + [ 143 + "$TC action add action gate base-time 200000000000ns sched-entry open 200000000ns -1 8000000b index 302", 144 + 0, 145 + 1, 146 + 255 147 + ] 148 + ], 149 + "cmdUnderTest": "$TC action delete action gate index 302", 150 + "expExitCode": "0", 151 + "verifyCmd": "$TC action get action bpf index 302", 152 + "matchPattern": "action order [0-9]*: .*base-time 200s.*index 302 ref", 153 + "matchCount": "0", 154 + "teardown": [ 155 + "$TC action flush action gate" 156 + ] 157 + }, 158 + { 159 + "id": "3128", 160 + "name": "Delete gate action with invalid index", 161 + "category": [ 162 + "actions", 163 + "gate" 164 + ], 165 + "setup": [ 166 + [ 167 + "$TC actions flush action gate", 168 + 0, 169 + 1, 170 + 255 171 + ], 172 + [ 173 + "$TC action add action gate base-time 600000000000ns sched-entry open 200000000ns -1 8000000b index 999", 174 + 0, 175 + 1, 176 + 255 177 + ] 178 + ], 179 + "cmdUnderTest": "$TC action delete action gate index 333", 180 + "expExitCode": "255", 181 + "verifyCmd": "$TC action get action gate index 999", 182 + "matchPattern": "action order [0-9]*: .*base-time 600s.*index 999 ref", 183 + "matchCount": "1", 184 + "teardown": [ 185 + "$TC action flush action gate" 186 + ] 187 + }, 188 + { 189 + "id": "7837", 190 + "name": "List gate actions", 191 + "category": [ 192 + "actions", 193 + "gate" 194 + ], 195 + "setup": [ 196 + [ 197 + "$TC action flush action gate", 198 + 0, 199 + 1, 200 + 255 201 + ], 202 + "$TC action add action gate base-time 600000000000ns sched-entry open 200000000ns -1 8000000b index 101", 203 + "$TC action add action gate cycle-time 600000000000ns sched-entry open 600000000ns -1 8000000b index 102", 204 + "$TC action add action gate cycle-time-ext 400000000000ns sched-entry close 100000000ns index 103" 205 + ], 206 + "cmdUnderTest": "$TC action list action gate", 207 + "expExitCode": "0", 208 + "verifyCmd": "$TC action list action gate", 209 + "matchPattern": "action order [0-9]*:", 210 + "matchCount": "3", 211 + "teardown": [ 212 + "$TC actions flush action gate" 213 + ] 214 + }, 215 + { 216 + "id": "9273", 217 + "name": "Flush gate actions", 218 + "category": [ 219 + "actions", 220 + "gate" 221 + ], 222 + "setup": [ 223 + [ 224 + "$TC actions flush action gate", 225 + 0, 226 + 1, 227 + 255 228 + ], 229 + "$TC action add action gate base-time 600000000000ns sched-entry open 200000000ns -1 8000000b index 101", 230 + "$TC action add action gate cycle-time 600000000000ns sched-entry open 600000000ns -1 8000000b index 102", 231 + "$TC action add action gate cycle-time-ext 400000000000ns sched-entry close 100000000ns index 103" 232 + ], 233 + "cmdUnderTest": "$TC action flush action gate", 234 + "expExitCode": "0", 235 + "verifyCmd": "$TC action list action gate", 236 + "matchPattern": "action order [0-9]*: .*priority", 237 + "matchCount": "0", 238 + "teardown": [ 239 + "$TC actions flush action gate" 240 + ] 241 + }, 242 + { 243 + "id": "c829", 244 + "name": "Add gate action with duplicate index", 245 + "category": [ 246 + "actions", 247 + "gate" 248 + ], 249 + "setup": [ 250 + [ 251 + "$TC actions flush action gate", 252 + 0, 253 + 1, 254 + 255 255 + ], 256 + "$TC action add action gate cycle-time 600000000000ns sched-entry open 600000000ns -1 8000000b index 4294967295" 257 + ], 258 + "cmdUnderTest": "$TC action add action gate cycle-time 600000000000ns sched-entry open 600000000ns -1 8000000b index 4294967295", 259 + "expExitCode": "255", 260 + "verifyCmd": "$TC action get action gate index 4294967295", 261 + "matchPattern": "action order [0-9]*: .*index 4294967295", 262 + "matchCount": "1", 263 + "teardown": [ 264 + "$TC action flush action gate" 265 + ] 266 + }, 267 + { 268 + "id": "3043", 269 + "name": "Add gate action with invalid index", 270 + "category": [ 271 + "actions", 272 + "gate" 273 + ], 274 + "setup": [ 275 + [ 276 + "$TC actions flush action gate", 277 + 0, 278 + 1, 279 + 255 280 + ] 281 + ], 282 + "cmdUnderTest": "$TC action add action gate cycle-time-ext 400000000000ns sched-entry close 100000000ns index 4294967296", 283 + "expExitCode": "255", 284 + "verifyCmd": "$TC action ls action gate", 285 + "matchPattern": "action order [0-9]*:", 286 + "matchCount": "0", 287 + "teardown": [ 288 + "$TC action flush action gate" 289 + ] 290 + }, 291 + { 292 + "id": "2930", 293 + "name": "Add gate action with cookie", 294 + "category": [ 295 + "actions", 296 + "gate" 297 + ], 298 + "setup": [ 299 + [ 300 + "$TC actions flush action gate", 301 + 0, 302 + 1, 303 + 255 304 + ] 305 + ], 306 + "cmdUnderTest": "$TC action add action gate cycle-time-ext 400000000000ns sched-entry close 100000000ns index 4294 cookie d0d0d0d0d0d0d0d0", 307 + "expExitCode": "0", 308 + "verifyCmd": "$TC action list action gate", 309 + "matchPattern": "action order [0-9]*: .*cookie d0d0d0d0d0d0d0", 310 + "matchCount": "1", 311 + "teardown": [ 312 + "$TC action flush action gate" 313 + ] 314 + } 315 + ]
+50
tools/testing/selftests/tc-testing/tc-tests/actions/ife.json
··· 1085 1085 "teardown": [ 1086 1086 "$TC actions flush action ife" 1087 1087 ] 1088 + }, 1089 + { 1090 + "id": "a972", 1091 + "name": "Delete ife encode action with valid index", 1092 + "category": [ 1093 + "actions", 1094 + "ife" 1095 + ], 1096 + "setup": [ 1097 + [ 1098 + "$TC actions flush action ife", 1099 + 0, 1100 + 1, 1101 + 255 1102 + ], 1103 + "$TC actions add action ife encode allow mark pass index 20" 1104 + ], 1105 + "cmdUnderTest": "$TC actions del action ife index 20", 1106 + "expExitCode": "0", 1107 + "verifyCmd": "$TC actions ls action ife index 20", 1108 + "matchPattern": "action order [0-9]*: ife encode action pass.*type 0[xX]ED3E.*allow mark.*index 20", 1109 + "matchCount": "0", 1110 + "teardown": [ 1111 + "$TC actions flush action ife" 1112 + ] 1113 + }, 1114 + { 1115 + "id": "1272", 1116 + "name": "Delete ife encode action with invalid index", 1117 + "category": [ 1118 + "actions", 1119 + "ife" 1120 + ], 1121 + "setup": [ 1122 + [ 1123 + "$TC actions flush action ife", 1124 + 0, 1125 + 1, 1126 + 255 1127 + ], 1128 + "$TC actions add action ife encode allow mark pass index 20" 1129 + ], 1130 + "cmdUnderTest": "$TC actions del action ife index 10", 1131 + "expExitCode": "255", 1132 + "verifyCmd": "$TC actions ls action ife index 20", 1133 + "matchPattern": "action order [0-9]*: ife encode action pass.*type 0[xX]ED3E.*allow mark.*index 20", 1134 + "matchCount": "1", 1135 + "teardown": [ 1136 + "$TC actions flush action ife" 1137 + ] 1088 1138 } 1089 1139 ]
+50
tools/testing/selftests/tc-testing/tc-tests/actions/nat.json
··· 614 614 "teardown": [ 615 615 "$TC actions flush action nat" 616 616 ] 617 + }, 618 + { 619 + "id": "b811", 620 + "name": "Delete nat action with valid index", 621 + "category": [ 622 + "actions", 623 + "nat" 624 + ], 625 + "setup": [ 626 + [ 627 + "$TC actions flush action nat", 628 + 0, 629 + 1, 630 + 255 631 + ], 632 + "$TC actions add action nat ingress 1.1.1.1 2.2.2.2 drop index 20" 633 + ], 634 + "cmdUnderTest": "$TC actions del action nat index 20", 635 + "expExitCode": "0", 636 + "verifyCmd": "$TC actions ls action nat index 20", 637 + "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 2.2.2.2 drop.*index 20 ref", 638 + "matchCount": "0", 639 + "teardown": [ 640 + "$TC actions flush action nat" 641 + ] 642 + }, 643 + { 644 + "id": "a521", 645 + "name": "Delete nat action with invalid index", 646 + "category": [ 647 + "actions", 648 + "nat" 649 + ], 650 + "setup": [ 651 + [ 652 + "$TC actions flush action nat", 653 + 0, 654 + 1, 655 + 255 656 + ], 657 + "$TC actions add action nat ingress 1.1.1.1 2.2.2.2 drop index 20" 658 + ], 659 + "cmdUnderTest": "$TC actions del action nat index 10", 660 + "expExitCode": "255", 661 + "verifyCmd": "$TC actions ls action nat index 20", 662 + "matchPattern": "action order [0-9]+: nat ingress 1.1.1.1/32 2.2.2.2 drop.*index 20 ref", 663 + "matchCount": "1", 664 + "teardown": [ 665 + "$TC actions flush action nat" 666 + ] 617 667 } 618 668 ]
+50
tools/testing/selftests/tc-testing/tc-tests/actions/sample.json
··· 633 633 "teardown": [ 634 634 "$TC actions flush action sample" 635 635 ] 636 + }, 637 + { 638 + "id": "3872", 639 + "name": "Delete sample action with valid index", 640 + "category": [ 641 + "actions", 642 + "sample" 643 + ], 644 + "setup": [ 645 + [ 646 + "$TC actions flush action sample", 647 + 0, 648 + 1, 649 + 255 650 + ], 651 + "$TC actions add action sample rate 10 group 1 index 20" 652 + ], 653 + "cmdUnderTest": "$TC actions del action sample index 20", 654 + "expExitCode": "0", 655 + "verifyCmd": "$TC actions get action sample index 20", 656 + "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 20 ref", 657 + "matchCount": "0", 658 + "teardown": [ 659 + "$TC actions flush action sample" 660 + ] 661 + }, 662 + { 663 + "id": "a394", 664 + "name": "Delete sample action with invalid index", 665 + "category": [ 666 + "actions", 667 + "sample" 668 + ], 669 + "setup": [ 670 + [ 671 + "$TC actions flush action sample", 672 + 0, 673 + 1, 674 + 255 675 + ], 676 + "$TC actions add action sample rate 10 group 1 index 20" 677 + ], 678 + "cmdUnderTest": "$TC actions del action sample index 10", 679 + "expExitCode": "255", 680 + "verifyCmd": "$TC actions get action sample index 20", 681 + "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 20 ref", 682 + "matchCount": "1", 683 + "teardown": [ 684 + "$TC actions flush action sample" 685 + ] 636 686 } 637 687 ]
+50
tools/testing/selftests/tc-testing/tc-tests/actions/tunnel_key.json
··· 933 933 "teardown": [ 934 934 "$TC actions flush action tunnel_key" 935 935 ] 936 + }, 937 + { 938 + "id": "3671", 939 + "name": "Delete tunnel_key set action with valid index", 940 + "category": [ 941 + "actions", 942 + "tunnel_key" 943 + ], 944 + "setup": [ 945 + [ 946 + "$TC actions flush action tunnel_key", 947 + 0, 948 + 1, 949 + 255 950 + ], 951 + "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 index 1" 952 + ], 953 + "cmdUnderTest": "$TC actions del action tunnel_key index 1", 954 + "expExitCode": "0", 955 + "verifyCmd": "$TC actions list action tunnel_key", 956 + "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*index 1", 957 + "matchCount": "0", 958 + "teardown": [ 959 + "$TC actions flush action tunnel_key" 960 + ] 961 + }, 962 + { 963 + "id": "8597", 964 + "name": "Delete tunnel_key set action with invalid index", 965 + "category": [ 966 + "actions", 967 + "tunnel_key" 968 + ], 969 + "setup": [ 970 + [ 971 + "$TC actions flush action tunnel_key", 972 + 0, 973 + 1, 974 + 255 975 + ], 976 + "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 index 1" 977 + ], 978 + "cmdUnderTest": "$TC actions del action tunnel_key index 10", 979 + "expExitCode": "255", 980 + "verifyCmd": "$TC actions list action tunnel_key", 981 + "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*index 1", 982 + "matchCount": "1", 983 + "teardown": [ 984 + "$TC actions flush action tunnel_key" 985 + ] 936 986 } 937 987 ]
+219
tools/testing/selftests/tc-testing/tc-tests/actions/xt.json
··· 1 + [ 2 + { 3 + "id": "2029", 4 + "name": "Add xt action with log-prefix", 5 + "category": [ 6 + "actions", 7 + "xt" 8 + ], 9 + "setup": [ 10 + [ 11 + "$TC actions flush action xt", 12 + 0, 13 + 1, 14 + 255 15 + ] 16 + ], 17 + "cmdUnderTest": "$TC action add action xt -j LOG --log-prefix PONG index 100", 18 + "expExitCode": "0", 19 + "verifyCmd": "$TC action ls action xt", 20 + "matchPattern": "action order [0-9]*:.*target LOG level warning prefix \"PONG\".*index 100 ref", 21 + "matchCount": "1", 22 + "teardown": [ 23 + "$TC actions flush action xt" 24 + ] 25 + }, 26 + { 27 + "id": "3562", 28 + "name": "Replace xt action log-prefix", 29 + "category": [ 30 + "actions", 31 + "xt" 32 + ], 33 + "setup": [ 34 + [ 35 + "$TC actions flush action xt", 36 + 0, 37 + 1, 38 + 255 39 + ], 40 + [ 41 + "$TC action add action xt -j LOG --log-prefix PONG index 1", 42 + 0, 43 + 1, 44 + 255 45 + ] 46 + ], 47 + "cmdUnderTest": "$TC action replace action xt -j LOG --log-prefix WIN index 1", 48 + "expExitCode": "0", 49 + "verifyCmd": "$TC action get action xt index 1", 50 + "matchPattern": "action order [0-9]*:.*target LOG level warning prefix \"WIN\".*index 1 ref", 51 + "matchCount": "1", 52 + "teardown": [ 53 + "$TC action flush action xt" 54 + ] 55 + }, 56 + { 57 + "id": "8291", 58 + "name": "Delete xt action with valid index", 59 + "category": [ 60 + "actions", 61 + "xt" 62 + ], 63 + "setup": [ 64 + [ 65 + "$TC actions flush action xt", 66 + 0, 67 + 1, 68 + 255 69 + ], 70 + [ 71 + "$TC action add action xt -j LOG --log-prefix PONG index 1000", 72 + 0, 73 + 1, 74 + 255 75 + ] 76 + ], 77 + "cmdUnderTest": "$TC action delete action xt index 1000", 78 + "expExitCode": "0", 79 + "verifyCmd": "$TC action get action xt index 1000", 80 + "matchPattern": "action order [0-9]*:.*target LOG level warning prefix \"PONG\".*index 1000 ref", 81 + "matchCount": "0", 82 + "teardown": [ 83 + "$TC action flush action xt" 84 + ] 85 + }, 86 + { 87 + "id": "5169", 88 + "name": "Delete xt action with invalid index", 89 + "category": [ 90 + "actions", 91 + "xt" 92 + ], 93 + "setup": [ 94 + [ 95 + "$TC actions flush action xt", 96 + 0, 97 + 1, 98 + 255 99 + ], 100 + [ 101 + "$TC action add action xt -j LOG --log-prefix PONG index 1000", 102 + 0, 103 + 1, 104 + 255 105 + ] 106 + ], 107 + "cmdUnderTest": "$TC action delete action xt index 333", 108 + "expExitCode": "255", 109 + "verifyCmd": "$TC action get action xt index 1000", 110 + "matchPattern": "action order [0-9]*:.*target LOG level warning prefix \"PONG\".*index 1000 ref", 111 + "matchCount": "1", 112 + "teardown": [ 113 + "$TC action flush action xt" 114 + ] 115 + }, 116 + { 117 + "id": "7284", 118 + "name": "List xt actions", 119 + "category": [ 120 + "actions", 121 + "xt" 122 + ], 123 + "setup": [ 124 + [ 125 + "$TC action flush action xt", 126 + 0, 127 + 1, 128 + 255 129 + ], 130 + "$TC action add action xt -j LOG --log-prefix PONG index 1001", 131 + "$TC action add action xt -j LOG --log-prefix WIN index 1002", 132 + "$TC action add action xt -j LOG --log-prefix LOSE index 1003" 133 + ], 134 + "cmdUnderTest": "$TC action list action xt", 135 + "expExitCode": "0", 136 + "verifyCmd": "$TC action list action xt", 137 + "matchPattern": "action order [0-9]*: tablename:", 138 + "matchCount": "3", 139 + "teardown": [ 140 + "$TC actions flush action xt" 141 + ] 142 + }, 143 + { 144 + "id": "5010", 145 + "name": "Flush xt actions", 146 + "category": [ 147 + "actions", 148 + "xt" 149 + ], 150 + "setup": [ 151 + [ 152 + "$TC actions flush action xt", 153 + 0, 154 + 1, 155 + 255 156 + ], 157 + "$TC action add action xt -j LOG --log-prefix PONG index 1001", 158 + "$TC action add action xt -j LOG --log-prefix WIN index 1002", 159 + "$TC action add action xt -j LOG --log-prefix LOSE index 1003" 160 + ], 161 + "cmdUnderTest": "$TC action flush action xt", 162 + "expExitCode": "0", 163 + "verifyCmd": "$TC action list action xt", 164 + "matchPattern": "action order [0-9]*: tablename:", 165 + "matchCount": "0", 166 + "teardown": [ 167 + "$TC actions flush action xt" 168 + ] 169 + }, 170 + { 171 + "id": "8437", 172 + "name": "Add xt action with duplicate index", 173 + "category": [ 174 + "actions", 175 + "xt" 176 + ], 177 + "setup": [ 178 + [ 179 + "$TC actions flush action xt", 180 + 0, 181 + 1, 182 + 255 183 + ], 184 + "$TC action add action xt -j LOG --log-prefix PONG index 101" 185 + ], 186 + "cmdUnderTest": "$TC action add action xt -j LOG --log-prefix WIN index 101", 187 + "expExitCode": "255", 188 + "verifyCmd": "$TC action get action xt index 101", 189 + "matchPattern": "action order [0-9]*:.*target LOG level warning prefix \"PONG\".*index 101", 190 + "matchCount": "1", 191 + "teardown": [ 192 + "$TC action flush action xt" 193 + ] 194 + }, 195 + { 196 + "id": "2837", 197 + "name": "Add xt action with invalid index", 198 + "category": [ 199 + "actions", 200 + "xt" 201 + ], 202 + "setup": [ 203 + [ 204 + "$TC actions flush action xt", 205 + 0, 206 + 1, 207 + 255 208 + ] 209 + ], 210 + "cmdUnderTest": "$TC action add action xt -j LOG --log-prefix WIN index 4294967296", 211 + "expExitCode": "255", 212 + "verifyCmd": "$TC action ls action xt", 213 + "matchPattern": "action order [0-9]*:*target LOG level warning prefix \"WIN\"", 214 + "matchCount": "0", 215 + "teardown": [ 216 + "$TC action flush action xt" 217 + ] 218 + } 219 + ]