Commit ca4fa874 authored by renmingshuai's avatar renmingshuai Committed by Jakub Kicinski
Browse files

selftests: tc-testing: add one test for flushing explicitly created chain



Add the test for additional reference to chains that are explicitly
created by RTM_NEWCHAIN message.

The test result:

 1..1
 ok 1 c2b4 - soft lockup alarm will be not generated after delete the prio 0
  filter of the chain

This is a follow up to commit c9a82bec ("net/sched: cls_api: Fix lockup on flushing explicitly created chain").

Signed-off-by: default avatarMingshuai Ren <renmingshuai@huawei.com>
Acked-by: default avatarPedro Tammela <pctammela@mojatatu.com>
Acked-by: default avatarVictor Nogueira <victor@mojatatu.com>
Link: https://lore.kernel.org/r/20230620014939.2034054-1-renmingshuai@huawei.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1ca09f57
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
[
    {
        "id": "c2b4",
        "name": "soft lockup alarm will be not generated after delete the prio 0 filter of the chain",
        "category": [
            "filter",
            "chain"
        ],
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true",
            "$TC qdisc add dev $DUMMY root handle 1: htb default 1",
            "$TC chain add dev $DUMMY",
            "$TC filter del dev $DUMMY chain 0 parent 1: prio 0"
        ],
        "cmdUnderTest": "$TC filter add dev $DUMMY chain 0 parent 1:",
        "expExitCode": "2",
        "verifyCmd": "$TC chain ls dev $DUMMY",
        "matchPattern": "chain parent 1: chain 0",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY root handle 1: htb default 1",
            "$IP link del dev $DUMMY type dummy"
        ]
    }
]