Commit a32a4fa4 authored by Zhengchao Shao's avatar Zhengchao Shao Committed by David S. Miller

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: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 043b1643
...@@ -633,5 +633,55 @@ ...@@ -633,5 +633,55 @@
"teardown": [ "teardown": [
"$TC actions flush action sample" "$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"
]
} }
] ]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment