Commit de74998c authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

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: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Link: https://patch.msgid.link/20250613064136.3911944-1-edumazet@google.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6f10624d
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -264,5 +264,41 @@
        "matchPattern": "sfq",
        "matchCount": "0",
        "teardown": []
    },
    {
        "id": "cdc1",
        "name": "Check that a negative perturb timer is rejected",
        "category": [
            "qdisc",
            "sfq"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq perturb -10",
        "expExitCode": "2",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "sfq",
        "matchCount": "0",
        "teardown": []
    },
    {
        "id": "a9f0",
        "name": "Check that a too big perturb timer is rejected",
        "category": [
            "qdisc",
            "sfq"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq perturb 1000000000",
        "expExitCode": "2",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "sfq",
        "matchCount": "0",
        "teardown": []
    }
]