Skip to content

Commit de74998

Browse files
edumazetkuba-moo
authored andcommitted
selftests/tc-testing: sfq: check perturb timer values
Add one test to check that the kernel rejects a negative perturb timer. Add a second test checking that the kernel rejects a too big perturb timer. All test results: 1..2 ok 1 cdc1 - Check that a negative perturb timer is rejected ok 2 a9f0 - Check that a too big perturb timer is rejected Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Cong Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 6f10624 commit de74998

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
@@ -264,5 +264,41 @@
264264
"matchPattern": "sfq",
265265
"matchCount": "0",
266266
"teardown": []
267+
},
268+
{
269+
"id": "cdc1",
270+
"name": "Check that a negative perturb timer is rejected",
271+
"category": [
272+
"qdisc",
273+
"sfq"
274+
],
275+
"plugins": {
276+
"requires": "nsPlugin"
277+
},
278+
"setup": [],
279+
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq perturb -10",
280+
"expExitCode": "2",
281+
"verifyCmd": "$TC qdisc show dev $DUMMY",
282+
"matchPattern": "sfq",
283+
"matchCount": "0",
284+
"teardown": []
285+
},
286+
{
287+
"id": "a9f0",
288+
"name": "Check that a too big perturb timer is rejected",
289+
"category": [
290+
"qdisc",
291+
"sfq"
292+
],
293+
"plugins": {
294+
"requires": "nsPlugin"
295+
},
296+
"setup": [],
297+
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq perturb 1000000000",
298+
"expExitCode": "2",
299+
"verifyCmd": "$TC qdisc show dev $DUMMY",
300+
"matchPattern": "sfq",
301+
"matchCount": "0",
302+
"teardown": []
267303
}
268304
]

0 commit comments

Comments
 (0)