Skip to content

Commit b39d8c4

Browse files
w1ldptrkuba-moo
authored andcommitted
selftests/tc-testing: Fix SFB db test
Setting very small value of db like 10ms introduces rounding errors when converting to/from jiffies on some kernel configs. For example, on 250hz the actual value will be set to 12ms which causes the test to fail: # $ sudo ./tdc.py -d eth2 -e 3410 # -- ns/SubPlugin.__init__ # Test 3410: Create SFB with db setting # # All test results: # # 1..1 # not ok 1 3410 - Create SFB with db setting # Could not match regex pattern. Verify command output: # qdisc sfb 1: root refcnt 2 rehash 600s db 12ms limit 1000p max 25p target 20p increment 0.000503548 decrement 4.57771e-05 penalty_rate 10pps penalty_burst 20p Set the value to 100ms instead which currently seem to work on 100hz, 250hz, 300hz and 1000hz kernel configs. Fixes: 6ad92dc ("selftests/tc-testing: add selftests for sfb qdisc") Signed-off-by: Vlad Buslov <vladbu@nvidia.com> Reviewed-by: Pedro Tammela <pctammela@mojatatu.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent b849c56 commit b39d8c4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • tools/testing/selftests/tc-testing/tc-tests/qdiscs

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
"setup": [
5959
"$IP link add dev $DUMMY type dummy || /bin/true"
6060
],
61-
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb db 10",
61+
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb db 100",
6262
"expExitCode": "0",
6363
"verifyCmd": "$TC qdisc show dev $DUMMY",
64-
"matchPattern": "qdisc sfb 1: root refcnt [0-9]+ rehash 600s db 10ms",
64+
"matchPattern": "qdisc sfb 1: root refcnt [0-9]+ rehash 600s db 100ms",
6565
"matchCount": "1",
6666
"teardown": [
6767
"$TC qdisc del dev $DUMMY handle 1: root",

0 commit comments

Comments
 (0)