Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Link: https://patch.msgid.link/20250613064136.3911944-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
de74998c 6f10624d

+36
+36
tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfq.json
··· 264 264 "matchPattern": "sfq", 265 265 "matchCount": "0", 266 266 "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": [] 267 303 } 268 304 ]