Skip to content

Commit

Permalink
selftests/tc-testing: sfq: check that a derived limit of 1 is rejected
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Octavian Purdila authored and David S. Miller committed Apr 9, 2025
1 parent b3bf8f6 commit 26e7051
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfq.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,41 @@
"matchCount": "0",
"teardown": [
]
},
{
"id": "7f8f",
"name": "Check that a derived limit of 1 is rejected (limit 2 depth 1 flows 1)",
"category": [
"qdisc",
"sfq"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [],
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq limit 2 depth 1 flows 1",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "sfq",
"matchCount": "0",
"teardown": []
},
{
"id": "5168",
"name": "Check that a derived limit of 1 is rejected (limit 2 depth 1 divisor 1)",
"category": [
"qdisc",
"sfq"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [],
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq limit 2 depth 1 divisor 1",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "sfq",
"matchCount": "0",
"teardown": []
}
]

0 comments on commit 26e7051

Please sign in to comment.