tc-testing: updated vlan action tests with batch create/delete

Update TDC tests with cases varifying ability of TC to install or delete
batches of vlan actions.

Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Roman Mashak 2019-08-02 15:16:47 -04:00 committed by David S. Miller
parent b35475c549
commit 8571deb013
1 changed files with 94 additions and 0 deletions

View File

@ -713,5 +713,99 @@
"teardown": [
"$TC actions flush action vlan"
]
},
{
"id": "294e",
"name": "Add batch of 32 vlan push actions with cookie",
"category": [
"actions",
"vlan"
],
"setup": [
[
"$TC actions flush action vlan",
0,
1,
255
]
],
"cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan push protocol 802.1q id 4094 priority 7 pipe index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
"expExitCode": "0",
"verifyCmd": "$TC actions list action vlan",
"matchPattern": "^[ \t]+index [0-9]+ ref",
"matchCount": "32",
"teardown": [
"$TC actions flush action vlan"
]
},
{
"id": "56f7",
"name": "Delete batch of 32 vlan push actions",
"category": [
"actions",
"vlan"
],
"setup": [
[
"$TC actions flush action vlan",
0,
1,
255
],
"bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan push protocol 802.1q id 4094 priority 7 pipe index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
],
"cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
"expExitCode": "0",
"verifyCmd": "$TC actions list action vlan",
"matchPattern": "^[ \t]+index [0-9]+ ref",
"matchCount": "0",
"teardown": []
},
{
"id": "759f",
"name": "Add batch of 32 vlan pop actions with cookie",
"category": [
"actions",
"vlan"
],
"setup": [
[
"$TC actions flush action vlan",
0,
1,
255
]
],
"cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan pop continue index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
"expExitCode": "0",
"verifyCmd": "$TC actions list action vlan",
"matchPattern": "^[ \t]+index [0-9]+ ref",
"matchCount": "32",
"teardown": [
"$TC actions flush action vlan"
]
},
{
"id": "c84a",
"name": "Delete batch of 32 vlan pop actions",
"category": [
"actions",
"vlan"
],
"setup": [
[
"$TC actions flush action vlan",
0,
1,
255
],
"bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan pop index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
],
"cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
"expExitCode": "0",
"verifyCmd": "$TC actions list action vlan",
"matchPattern": "^[ \t]+index [0-9]+ ref",
"matchCount": "0",
"teardown": []
}
]