mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
selftests: implement flower classifier terse dump tests
Implement two basic tests to verify terse dump functionality of flower classifier: - Test that verifies that terse dump works. - Test that verifies that terse dump doesn't print filter key. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0348451db9
commit
e7534fd42a
1 changed files with 38 additions and 0 deletions
|
@ -87,5 +87,43 @@
|
||||||
"teardown": [
|
"teardown": [
|
||||||
"$TC qdisc del dev $DEV2 ingress"
|
"$TC qdisc del dev $DEV2 ingress"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "7c65",
|
||||||
|
"name": "Add flower filter and then terse dump it",
|
||||||
|
"category": [
|
||||||
|
"filter",
|
||||||
|
"flower"
|
||||||
|
],
|
||||||
|
"setup": [
|
||||||
|
"$TC qdisc add dev $DEV2 ingress"
|
||||||
|
],
|
||||||
|
"cmdUnderTest": "$TC filter add dev $DEV2 protocol ip pref 1 ingress flower dst_mac e4:11:22:11:4a:51 action drop",
|
||||||
|
"expExitCode": "0",
|
||||||
|
"verifyCmd": "$TC filter show terse dev $DEV2 ingress",
|
||||||
|
"matchPattern": "filter protocol ip pref 1 flower.*handle",
|
||||||
|
"matchCount": "1",
|
||||||
|
"teardown": [
|
||||||
|
"$TC qdisc del dev $DEV2 ingress"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "d45e",
|
||||||
|
"name": "Add flower filter and verify that terse dump doesn't output filter key",
|
||||||
|
"category": [
|
||||||
|
"filter",
|
||||||
|
"flower"
|
||||||
|
],
|
||||||
|
"setup": [
|
||||||
|
"$TC qdisc add dev $DEV2 ingress"
|
||||||
|
],
|
||||||
|
"cmdUnderTest": "$TC filter add dev $DEV2 protocol ip pref 1 ingress flower dst_mac e4:11:22:11:4a:51 action drop",
|
||||||
|
"expExitCode": "0",
|
||||||
|
"verifyCmd": "$TC filter show terse dev $DEV2 ingress",
|
||||||
|
"matchPattern": " dst_mac e4:11:22:11:4a:51",
|
||||||
|
"matchCount": "0",
|
||||||
|
"teardown": [
|
||||||
|
"$TC qdisc del dev $DEV2 ingress"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue