selftests/tc-testing: add selftests for atm qdisc
[platform/kernel/linux-starfive.git] / tools / testing / selftests / tc-testing / tc-tests / qdiscs / atm.json
1 [
2     {
3         "id": "7628",
4         "name": "Create ATM with default setting",
5         "category": [
6             "qdisc",
7             "atm"
8         ],
9         "plugins": {
10             "requires": "nsPlugin"
11         },
12         "setup": [
13             "$IP link add dev $DUMMY type dummy || /bin/true"
14         ],
15         "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root atm",
16         "expExitCode": "0",
17         "verifyCmd": "$TC qdisc show dev $DUMMY",
18         "matchPattern": "qdisc atm 1: root refcnt",
19         "matchCount": "1",
20         "teardown": [
21             "$TC qdisc del dev $DUMMY handle 1: root",
22             "$IP link del dev $DUMMY type dummy"
23         ]
24     },
25     {
26         "id": "390a",
27         "name": "Delete ATM with valid handle",
28         "category": [
29             "qdisc",
30             "atm"
31         ],
32         "plugins": {
33             "requires": "nsPlugin"
34         },
35         "setup": [
36             "$IP link add dev $DUMMY type dummy || /bin/true",
37             "$TC qdisc add dev $DUMMY handle 1: root atm"
38         ],
39         "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
40         "expExitCode": "0",
41         "verifyCmd": "$TC qdisc show dev $DUMMY",
42         "matchPattern": "qdisc atm 1: root refcnt",
43         "matchCount": "0",
44         "teardown": [
45             "$IP link del dev $DUMMY type dummy"
46         ]
47     },
48     {
49         "id": "32a0",
50         "name": "Show ATM class",
51         "category": [
52             "qdisc",
53             "atm"
54         ],
55         "plugins": {
56             "requires": "nsPlugin"
57         },
58         "setup": [
59             "$IP link add dev $DUMMY type dummy || /bin/true"
60         ],
61         "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root atm",
62         "expExitCode": "0",
63         "verifyCmd": "$TC class show dev $DUMMY",
64         "matchPattern": "class atm 1: parent 1:",
65         "matchCount": "1",
66         "teardown": [
67             "$TC qdisc del dev $DUMMY handle 1: root",
68             "$IP link del dev $DUMMY type dummy"
69         ]
70     },
71     {
72         "id": "6310",
73         "name": "Dump ATM stats",
74         "category": [
75             "qdisc",
76             "atm"
77         ],
78         "plugins": {
79             "requires": "nsPlugin"
80         },
81         "setup": [
82             "$IP link add dev $DUMMY type dummy || /bin/true"
83         ],
84         "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root atm",
85         "expExitCode": "0",
86         "verifyCmd": "$TC -s qdisc show dev $DUMMY",
87         "matchPattern": "qdisc atm 1: root refcnt",
88         "matchCount": "1",
89         "teardown": [
90             "$TC qdisc del dev $DUMMY handle 1: root",
91             "$IP link del dev $DUMMY type dummy"
92         ]
93     }
94 ]