xref: /linux/tools/testing/selftests/tc-testing/tc-tests/qdiscs/plug.json (revision 0526b56cbc3c489642bd6a5fe4b718dea7ef0ee8)
1[
2    {
3        "id": "3289",
4        "name": "Create PLUG with default setting",
5        "category": [
6            "qdisc",
7            "plug"
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 plug",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $DUMMY",
18        "matchPattern": "qdisc plug 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": "0917",
27        "name": "Create PLUG with block setting",
28        "category": [
29            "qdisc",
30            "plug"
31        ],
32        "plugins": {
33            "requires": "nsPlugin"
34        },
35        "setup": [
36            "$IP link add dev $DUMMY type dummy || /bin/true"
37        ],
38        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root plug block",
39        "expExitCode": "0",
40        "verifyCmd": "$TC qdisc show dev $DUMMY",
41        "matchPattern": "qdisc plug 1: root refcnt",
42        "matchCount": "1",
43        "teardown": [
44            "$TC qdisc del dev $DUMMY handle 1: root",
45            "$IP link del dev $DUMMY type dummy"
46        ]
47    },
48    {
49        "id": "483b",
50        "name": "Create PLUG with release setting",
51        "category": [
52            "qdisc",
53            "plug"
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 plug release",
62        "expExitCode": "0",
63        "verifyCmd": "$TC qdisc show dev $DUMMY",
64        "matchPattern": "qdisc plug 1: root refcnt",
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": "4995",
73        "name": "Create PLUG with release_indefinite setting",
74        "category": [
75            "qdisc",
76            "plug"
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 plug release_indefinite",
85        "expExitCode": "0",
86        "verifyCmd": "$TC qdisc show dev $DUMMY",
87        "matchPattern": "qdisc plug 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    {
95        "id": "389c",
96        "name": "Create PLUG with limit setting",
97        "category": [
98            "qdisc",
99            "plug"
100        ],
101        "plugins": {
102            "requires": "nsPlugin"
103        },
104        "setup": [
105            "$IP link add dev $DUMMY type dummy || /bin/true"
106        ],
107        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root plug limit 100",
108        "expExitCode": "0",
109        "verifyCmd": "$TC qdisc show dev $DUMMY",
110        "matchPattern": "qdisc plug 1: root refcnt",
111        "matchCount": "1",
112        "teardown": [
113            "$TC qdisc del dev $DUMMY handle 1: root",
114            "$IP link del dev $DUMMY type dummy"
115        ]
116    },
117    {
118        "id": "384a",
119        "name": "Delete PLUG with valid handle",
120        "category": [
121            "qdisc",
122            "plug"
123        ],
124        "plugins": {
125            "requires": "nsPlugin"
126        },
127        "setup": [
128            "$IP link add dev $DUMMY type dummy || /bin/true",
129            "$TC qdisc add dev $DUMMY handle 1: root plug"
130        ],
131        "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
132        "expExitCode": "0",
133        "verifyCmd": "$TC qdisc show dev $DUMMY",
134        "matchPattern": "qdisc plug 1: root refcnt",
135        "matchCount": "0",
136        "teardown": [
137            "$IP link del dev $DUMMY type dummy"
138        ]
139    },
140    {
141        "id": "439a",
142        "name": "Replace PLUG with limit setting",
143        "category": [
144            "qdisc",
145            "plug"
146        ],
147        "plugins": {
148            "requires": "nsPlugin"
149        },
150        "setup": [
151            "$IP link add dev $DUMMY type dummy || /bin/true",
152            "$TC qdisc add dev $DUMMY handle 1: root plug"
153        ],
154        "cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root plug limit 1000",
155        "expExitCode": "0",
156        "verifyCmd": "$TC qdisc show dev $DUMMY",
157        "matchPattern": "qdisc plug 1: root refcnt",
158        "matchCount": "1",
159        "teardown": [
160            "$TC qdisc del dev $DUMMY handle 1: root",
161            "$IP link del dev $DUMMY type dummy"
162        ]
163    },
164    {
165        "id": "9831",
166        "name": "Change PLUG with limit setting",
167        "category": [
168            "qdisc",
169            "plug"
170        ],
171        "plugins": {
172            "requires": "nsPlugin"
173        },
174        "setup": [
175            "$IP link add dev $DUMMY type dummy || /bin/true",
176            "$TC qdisc add dev $DUMMY handle 1: root plug"
177        ],
178        "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root plug limit 1000",
179        "expExitCode": "0",
180        "verifyCmd": "$TC qdisc show dev $DUMMY",
181        "matchPattern": "qdisc plug 1: root refcnt",
182        "matchCount": "1",
183        "teardown": [
184            "$TC qdisc del dev $DUMMY handle 1: root",
185            "$IP link del dev $DUMMY type dummy"
186        ]
187    }
188]
189