Skip to content

Commit 26e7051

Browse files
tavipdavem330
authored andcommitted
selftests/tc-testing: sfq: check that a derived limit of 1 is rejected
Because the limit is updated indirectly when other parameters are updated, there are cases where even though the user requests a limit of 2 it can actually be set to 1. Add the following test cases to check that the kernel rejects them: - limit 2 depth 1 flows 1 - limit 2 depth 1 divisor 1 Signed-off-by: Octavian Purdila <tavip@google.com> Acked-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b3bf8f6 commit 26e7051

File tree

1 file changed

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

1 file changed

+36
-0
lines changed

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,41 @@
228228
"matchCount": "0",
229229
"teardown": [
230230
]
231+
},
232+
{
233+
"id": "7f8f",
234+
"name": "Check that a derived limit of 1 is rejected (limit 2 depth 1 flows 1)",
235+
"category": [
236+
"qdisc",
237+
"sfq"
238+
],
239+
"plugins": {
240+
"requires": "nsPlugin"
241+
},
242+
"setup": [],
243+
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq limit 2 depth 1 flows 1",
244+
"expExitCode": "2",
245+
"verifyCmd": "$TC qdisc show dev $DUMMY",
246+
"matchPattern": "sfq",
247+
"matchCount": "0",
248+
"teardown": []
249+
},
250+
{
251+
"id": "5168",
252+
"name": "Check that a derived limit of 1 is rejected (limit 2 depth 1 divisor 1)",
253+
"category": [
254+
"qdisc",
255+
"sfq"
256+
],
257+
"plugins": {
258+
"requires": "nsPlugin"
259+
},
260+
"setup": [],
261+
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq limit 2 depth 1 divisor 1",
262+
"expExitCode": "2",
263+
"verifyCmd": "$TC qdisc show dev $DUMMY",
264+
"matchPattern": "sfq",
265+
"matchCount": "0",
266+
"teardown": []
231267
}
232268
]

0 commit comments

Comments
 (0)