Commit 60260ad9 authored by Victor Nogueira's avatar Victor Nogueira Committed by Jakub Kicinski
Browse files

selftests/tc-testing: Create tests trying to add children to clsact/ingress qdiscs

In response to Wang's bug report [1], add the following test cases:

- Try and fail to add an fq child to an ingress qdisc
- Try and fail to add an fq child to a clsact qdisc

[1] https://lore.kernel.org/netdev/20251105022213.1981982-1-wangliang74@huawei.com/



Reviewed-by: default avatarPedro Tammela <pctammela@mojatatu.ai>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarVictor Nogueira <victor@mojatatu.com>
Reviewed-by: default avatarCong Wang <cwang@multikernel.io>
Link: https://patch.msgid.link/20251106205621.3307639-2-victor@mojatatu.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e781122d
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -961,5 +961,49 @@
        "teardown": [
            "$TC qdisc del dev $DUMMY root"
        ]
    },
    {
        "id": "4989",
        "name": "Try to add an fq child to an ingress qdisc",
        "category": [
            "qdisc",
            "ingress"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$TC qdisc add dev $DUMMY handle ffff:0 ingress"
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY parent ffff:0 handle ffe0:0 fq",
        "expExitCode": "2",
        "verifyCmd": "$TC -j qdisc ls dev $DUMMY handle ffe0:",
        "matchJSON": [],
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY ingress"
        ]
    },
    {
        "id": "c2b0",
        "name": "Try to add an fq child to a clsact qdisc",
        "category": [
            "qdisc",
            "ingress"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$TC qdisc add dev $DUMMY handle ffff:0 clsact"
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY parent ffff:0 handle ffe0:0 fq",
        "expExitCode": "2",
        "verifyCmd": "$TC -j qdisc ls dev $DUMMY handle ffe0:",
        "matchJSON": [],
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY clsact"
        ]
    }
]