提交 c127ffa2 编写于 作者: B Baowen Zheng 提交者: David S. Miller

selftests: tc-testing: add action police selftest for packets per second

Add selftest cases in action police for packets per second.
These tests depend on corresponding iproute2 command support.
Signed-off-by: NBaowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: NSimon Horman <simon.horman@netronome.com>
Reviewed-by: NJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a7fd0e6d
...@@ -764,5 +764,53 @@ ...@@ -764,5 +764,53 @@
"teardown": [ "teardown": [
"$TC actions flush action police" "$TC actions flush action police"
] ]
},
{
"id": "cdd7",
"name": "Add valid police action with packets per second rate limit",
"category": [
"actions",
"police"
],
"setup": [
[
"$TC actions flush action police",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action police pkts_rate 1000 pkts_burst 200 index 1",
"expExitCode": "0",
"verifyCmd": "$TC actions ls action police",
"matchPattern": "action order [0-9]*: police 0x1 rate 0bit burst 0b mtu 4096Mb pkts_rate 1000 pkts_burst 200",
"matchCount": "1",
"teardown": [
"$TC actions flush action police"
]
},
{
"id": "f5bc",
"name": "Add invalid police action with both bps and pps",
"category": [
"actions",
"police"
],
"setup": [
[
"$TC actions flush action police",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions add action police rate 1kbit burst 10k pkts_rate 1000 pkts_burst 200 index 1",
"expExitCode": "255",
"verifyCmd": "$TC actions ls action police",
"matchPattern": "action order [0-9]*: police 0x1 ",
"matchCount": "0",
"teardown": [
"$TC actions flush action police"
]
} }
] ]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册