Commit 26e70518 authored by Octavian Purdila's avatar Octavian Purdila Committed by David S. Miller
Browse files

selftests/tc-testing: sfq: check that a derived limit of 1 is rejected



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: default avatarOctavian Purdila <tavip@google.com>
Acked-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3bf8f63
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -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": []
    }
]