Skip to content

Commit

Permalink
selftests: add a tc matchall test case
Browse files Browse the repository at this point in the history
This is a follow up of the commit 0db6f8b ("net/sched: fix ->get
helper of the matchall cls").

To test it:
$ cd tools/testing/selftests/tc-testing
$ ln -s ../plugin-lib/nsPlugin.py plugins/20-nsPlugin.py
$ ./tdc.py -n -e 2638

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
NicolasDichtel authored and davem330 committed Apr 8, 2019
1 parent 6491d69 commit b959ecf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id": "2638",
"name": "Add matchall and try to get it",
"category": [
"filter",
"matchall"
],
"setup": [
"$TC qdisc add dev $DEV1 clsact",
"$TC filter add dev $DEV1 protocol all pref 1 ingress handle 0x1234 matchall action ok"
],
"cmdUnderTest": "$TC filter get dev $DEV1 protocol all pref 1 ingress handle 0x1234 matchall",
"expExitCode": "0",
"verifyCmd": "$TC filter show dev $DEV1 ingress",
"matchPattern": "filter protocol all pref 1 matchall chain 0 handle 0x1234",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 clsact"
]
},
{
"id": "d052",
"name": "Add 1M filters with the same action",
Expand Down

0 comments on commit b959ecf

Please sign in to comment.