diff options
author | Zhengchao Shao <shaozhengchao@huawei.com> | 2022-09-09 04:29:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-16 16:25:16 +0300 |
commit | 0fc8674663f6327fdeddc40f9f1abe26726341ab (patch) | |
tree | d1996b73b970fa13b77eacc74e4cdeba662d9bf6 /tools/testing/selftests/tc-testing/tc-tests/actions | |
parent | 910d504bc1879f2f89ac54b288924b0af1664287 (diff) | |
download | linux-0fc8674663f6327fdeddc40f9f1abe26726341ab.tar.xz |
selftests/tc-testings: add connmark action deleting test case
Test 6571: Delete connmark action with valid index
Test 3426: Delete connmark action with invalid index
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/tc-testing/tc-tests/actions')
-rw-r--r-- | tools/testing/selftests/tc-testing/tc-tests/actions/connmark.json | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/connmark.json b/tools/testing/selftests/tc-testing/tc-tests/actions/connmark.json index cadde8f41fcd..0de2f79ea329 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/actions/connmark.json +++ b/tools/testing/selftests/tc-testing/tc-tests/actions/connmark.json @@ -312,5 +312,55 @@ "teardown": [ "$TC actions flush action connmark" ] + }, + { + "id": "6571", + "name": "Delete connmark action with valid index", + "category": [ + "actions", + "connmark" + ], + "setup": [ + [ + "$TC actions flush action connmark", + 0, + 1, + 255 + ], + "$TC actions add action connmark pass index 20" + ], + "cmdUnderTest": "$TC actions del action connmark index 20", + "expExitCode": "0", + "verifyCmd": "$TC actions get action connmark index 20", + "matchPattern": "action order [0-9]+: connmark zone 0 pass.*index 20 ref", + "matchCount": "0", + "teardown": [ + "$TC actions flush action connmark" + ] + }, + { + "id": "3426", + "name": "Delete connmark action with invalid index", + "category": [ + "actions", + "connmark" + ], + "setup": [ + [ + "$TC actions flush action connmark", + 0, + 1, + 255 + ], + "$TC actions add action connmark pass index 20" + ], + "cmdUnderTest": "$TC actions del action connmark index 1", + "expExitCode": "255", + "verifyCmd": "$TC actions get action connmark index 20", + "matchPattern": "action order [0-9]+: connmark zone 0 pass.*index 20 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action connmark" + ] } ] |