Skip to content

Commit bb7737d

Browse files
congwangkuba-moo
authored andcommitted
selftests/tc-testing: Add a test case for DRR class with TC_H_ROOT
Integrate the reproduer from Mingi to TDC. All test results: 1..4 ok 1 0385 - Create DRR with default setting ok 2 2375 - Delete DRR with handle ok 3 3092 - Show DRR class ok 4 4009 - Reject creation of DRR class with classid TC_H_ROOT Cc: Mingi Cho <[email protected]> Signed-off-by: Cong Wang <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 0c3057a commit bb7737d

File tree

1 file changed

+25
-0
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/qdiscs

1 file changed

+25
-0
lines changed

tools/testing/selftests/tc-testing/tc-tests/qdiscs/drr.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,30 @@
6161
"teardown": [
6262
"$TC qdisc del dev $DUMMY handle 1: root"
6363
]
64+
},
65+
{
66+
"id": "4009",
67+
"name": "Reject creation of DRR class with classid TC_H_ROOT",
68+
"category": [
69+
"qdisc",
70+
"drr"
71+
],
72+
"plugins": {
73+
"requires": "nsPlugin"
74+
},
75+
"setup": [
76+
"$TC qdisc add dev $DUMMY root handle ffff: drr",
77+
"$TC filter add dev $DUMMY parent ffff: basic classid ffff:1",
78+
"$TC class add dev $DUMMY parent ffff: classid ffff:1 drr",
79+
"$TC filter add dev $DUMMY parent ffff: prio 1 u32 match u16 0x0000 0xfe00 at 2 flowid ffff:ffff"
80+
],
81+
"cmdUnderTest": "$TC class add dev $DUMMY parent ffff: classid ffff:ffff drr",
82+
"expExitCode": "2",
83+
"verifyCmd": "$TC class show dev $DUMMY",
84+
"matchPattern": "class drr ffff:ffff",
85+
"matchCount": "0",
86+
"teardown": [
87+
"$TC qdisc del dev $DUMMY root"
88+
]
6489
}
6590
]

0 commit comments

Comments
 (0)