diff options
author | Zhengchao Shao <shaozhengchao@huawei.com> | 2022-09-09 03:29:35 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-16 15:25:16 +0200 |
commit | a32a4fa447f58edda2ee2eb1be9ce1260cfd6a40 (patch) | |
tree | dede150dd20a6a8b1a02a35bc36c98a165f3cf4d /tools/testing/selftests/tc-testing | |
parent | selftests/tc-testings: add nat action deleting test case (diff) | |
download | linux-a32a4fa447f58edda2ee2eb1be9ce1260cfd6a40.tar.xz linux-a32a4fa447f58edda2ee2eb1be9ce1260cfd6a40.zip |
selftests/tc-testings: add sample action deleting test case
Test 3872: Delete sample action with valid index
Test a394: Delete sample 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')
-rw-r--r-- | tools/testing/selftests/tc-testing/tc-tests/actions/sample.json | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/sample.json b/tools/testing/selftests/tc-testing/tc-tests/actions/sample.json index ddabb160a11b..148d8bcb8606 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/actions/sample.json +++ b/tools/testing/selftests/tc-testing/tc-tests/actions/sample.json @@ -633,5 +633,55 @@ "teardown": [ "$TC actions flush action sample" ] + }, + { + "id": "3872", + "name": "Delete sample action with valid index", + "category": [ + "actions", + "sample" + ], + "setup": [ + [ + "$TC actions flush action sample", + 0, + 1, + 255 + ], + "$TC actions add action sample rate 10 group 1 index 20" + ], + "cmdUnderTest": "$TC actions del action sample index 20", + "expExitCode": "0", + "verifyCmd": "$TC actions get action sample index 20", + "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 20 ref", + "matchCount": "0", + "teardown": [ + "$TC actions flush action sample" + ] + }, + { + "id": "a394", + "name": "Delete sample action with invalid index", + "category": [ + "actions", + "sample" + ], + "setup": [ + [ + "$TC actions flush action sample", + 0, + 1, + 255 + ], + "$TC actions add action sample rate 10 group 1 index 20" + ], + "cmdUnderTest": "$TC actions del action sample index 10", + "expExitCode": "255", + "verifyCmd": "$TC actions get action sample index 20", + "matchPattern": "action order [0-9]+: sample rate 1/10 group 1.*index 20 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action sample" + ] } ] |