Skip to content

Commit b959ecf

Browse files
NicolasDichteldavem330
authored andcommitted
selftests: add a tc matchall test case
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>
1 parent 6491d69 commit b959ecf

File tree

1 file changed

+20
-0
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/filters

1 file changed

+20
-0
lines changed

tools/testing/selftests/tc-testing/tc-tests/filters/tests.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,26 @@
1818
"$TC qdisc del dev $DEV1 ingress"
1919
]
2020
},
21+
{
22+
"id": "2638",
23+
"name": "Add matchall and try to get it",
24+
"category": [
25+
"filter",
26+
"matchall"
27+
],
28+
"setup": [
29+
"$TC qdisc add dev $DEV1 clsact",
30+
"$TC filter add dev $DEV1 protocol all pref 1 ingress handle 0x1234 matchall action ok"
31+
],
32+
"cmdUnderTest": "$TC filter get dev $DEV1 protocol all pref 1 ingress handle 0x1234 matchall",
33+
"expExitCode": "0",
34+
"verifyCmd": "$TC filter show dev $DEV1 ingress",
35+
"matchPattern": "filter protocol all pref 1 matchall chain 0 handle 0x1234",
36+
"matchCount": "1",
37+
"teardown": [
38+
"$TC qdisc del dev $DEV1 clsact"
39+
]
40+
},
2141
{
2242
"id": "d052",
2343
"name": "Add 1M filters with the same action",

0 commit comments

Comments
 (0)