xref: /linux/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ets.json (revision 82c664b69c8b3729dfcf33e9abfd952dad35fcca)
1[
2    {
3        "id": "e90e",
4        "name": "Add ETS qdisc using bands",
5        "category": [
6            "qdisc",
7            "ets"
8        ],
9        "setup": [
10            "$IP link add dev $DUMMY type dummy || /bin/true"
11        ],
12        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 2",
13        "expExitCode": "0",
14        "verifyCmd": "$TC qdisc show dev $DUMMY",
15        "matchPattern": "qdisc ets 1: root .* bands 2",
16        "matchCount": "1",
17        "teardown": [
18            "$TC qdisc del dev $DUMMY handle 1: root",
19            "$IP link del dev $DUMMY type dummy"
20        ]
21    },
22    {
23        "id": "b059",
24        "name": "Add ETS qdisc using quanta",
25        "category": [
26            "qdisc",
27            "ets"
28        ],
29        "setup": [
30            "$IP link add dev $DUMMY type dummy || /bin/true"
31        ],
32        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 1000 900 800 700",
33        "expExitCode": "0",
34        "verifyCmd": "$TC qdisc show dev $DUMMY",
35        "matchPattern": "qdisc ets 1: root .*bands 4 quanta 1000 900 800 700",
36        "matchCount": "1",
37        "teardown": [
38            "$TC qdisc del dev $DUMMY handle 1: root",
39            "$IP link del dev $DUMMY type dummy"
40        ]
41    },
42    {
43        "id": "e8e7",
44        "name": "Add ETS qdisc using strict",
45        "category": [
46            "qdisc",
47            "ets"
48        ],
49        "setup": [
50            "$IP link add dev $DUMMY type dummy || /bin/true"
51        ],
52        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 3",
53        "expExitCode": "0",
54        "verifyCmd": "$TC qdisc show dev $DUMMY",
55        "matchPattern": "qdisc ets 1: root .*bands 3 strict 3",
56        "matchCount": "1",
57        "teardown": [
58            "$TC qdisc del dev $DUMMY handle 1: root",
59            "$IP link del dev $DUMMY type dummy"
60        ]
61    },
62    {
63        "id": "233c",
64        "name": "Add ETS qdisc using bands + quanta",
65        "category": [
66            "qdisc",
67            "ets"
68        ],
69        "setup": [
70            "$IP link add dev $DUMMY type dummy || /bin/true"
71        ],
72        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 4 quanta 1000 900 800 700",
73        "expExitCode": "0",
74        "verifyCmd": "$TC qdisc show dev $DUMMY",
75        "matchPattern": "qdisc ets 1: root .*bands 4 quanta 1000 900 800 700 priomap",
76        "matchCount": "1",
77        "teardown": [
78            "$TC qdisc del dev $DUMMY handle 1: root",
79            "$IP link del dev $DUMMY type dummy"
80        ]
81    },
82    {
83        "id": "3d35",
84        "name": "Add ETS qdisc using bands + strict",
85        "category": [
86            "qdisc",
87            "ets"
88        ],
89        "setup": [
90            "$IP link add dev $DUMMY type dummy || /bin/true"
91        ],
92        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 3 strict 3",
93        "expExitCode": "0",
94        "verifyCmd": "$TC qdisc show dev $DUMMY",
95        "matchPattern": "qdisc ets 1: root .*bands 3 strict 3 priomap",
96        "matchCount": "1",
97        "teardown": [
98            "$TC qdisc del dev $DUMMY handle 1: root",
99            "$IP link del dev $DUMMY type dummy"
100        ]
101    },
102    {
103        "id": "7f3b",
104        "name": "Add ETS qdisc using strict + quanta",
105        "category": [
106            "qdisc",
107            "ets"
108        ],
109        "setup": [
110            "$IP link add dev $DUMMY type dummy || /bin/true"
111        ],
112        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 3 quanta 1500 750",
113        "expExitCode": "0",
114        "verifyCmd": "$TC qdisc show dev $DUMMY",
115        "matchPattern": "qdisc ets 1: root .*bands 5 strict 3 quanta 1500 750 priomap",
116        "matchCount": "1",
117        "teardown": [
118            "$TC qdisc del dev $DUMMY handle 1: root",
119            "$IP link del dev $DUMMY type dummy"
120        ]
121    },
122    {
123        "id": "4593",
124        "name": "Add ETS qdisc using strict 0 + quanta",
125        "category": [
126            "qdisc",
127            "ets"
128        ],
129        "setup": [
130            "$IP link add dev $DUMMY type dummy || /bin/true"
131        ],
132        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 0 quanta 1500 750",
133        "expExitCode": "0",
134        "verifyCmd": "$TC qdisc show dev $DUMMY",
135        "matchPattern": "qdisc ets 1: root .*bands 2 quanta 1500 750 priomap",
136        "matchCount": "1",
137        "teardown": [
138            "$TC qdisc del dev $DUMMY handle 1: root",
139            "$IP link del dev $DUMMY type dummy"
140        ]
141    },
142    {
143        "id": "8938",
144        "name": "Add ETS qdisc using bands + strict + quanta",
145        "category": [
146            "qdisc",
147            "ets"
148        ],
149        "setup": [
150            "$IP link add dev $DUMMY type dummy || /bin/true"
151        ],
152        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 5 strict 3 quanta 1500 750",
153        "expExitCode": "0",
154        "verifyCmd": "$TC qdisc show dev $DUMMY",
155        "matchPattern": "qdisc ets 1: root .*bands 5 .*strict 3 quanta 1500 750 priomap",
156        "matchCount": "1",
157        "teardown": [
158            "$TC qdisc del dev $DUMMY handle 1: root",
159            "$IP link del dev $DUMMY type dummy"
160        ]
161    },
162    {
163        "id": "0782",
164        "name": "Add ETS qdisc with more bands than quanta",
165        "category": [
166            "qdisc",
167            "ets"
168        ],
169        "setup": [
170            "$IP link add dev $DUMMY type dummy || /bin/true"
171        ],
172        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 2 quanta 1000",
173        "expExitCode": "0",
174        "verifyCmd": "$TC qdisc show dev $DUMMY",
175        "matchPattern": "qdisc ets 1: root .*bands 2 .*quanta 1000 [1-9][0-9]* priomap",
176        "matchCount": "1",
177        "teardown": [
178            "$TC qdisc del dev $DUMMY handle 1: root",
179            "$IP link del dev $DUMMY type dummy"
180        ]
181    },
182    {
183        "id": "501b",
184        "name": "Add ETS qdisc with more bands than strict",
185        "category": [
186            "qdisc",
187            "ets"
188        ],
189        "setup": [
190            "$IP link add dev $DUMMY type dummy || /bin/true"
191        ],
192        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 3 strict 1",
193        "expExitCode": "0",
194        "verifyCmd": "$TC qdisc show dev $DUMMY",
195        "matchPattern": "qdisc ets 1: root .*bands 3 strict 1 quanta ([1-9][0-9]* ){2}priomap",
196        "matchCount": "1",
197        "teardown": [
198            "$TC qdisc del dev $DUMMY handle 1: root",
199            "$IP link del dev $DUMMY type dummy"
200        ]
201    },
202    {
203        "id": "671a",
204        "name": "Add ETS qdisc with more bands than strict + quanta",
205        "category": [
206            "qdisc",
207            "ets"
208        ],
209        "setup": [
210            "$IP link add dev $DUMMY type dummy || /bin/true"
211        ],
212        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 3 strict 1 quanta 1000",
213        "expExitCode": "0",
214        "verifyCmd": "$TC qdisc show dev $DUMMY",
215        "matchPattern": "qdisc ets 1: root .*bands 3 strict 1 quanta 1000 [1-9][0-9]* priomap",
216        "matchCount": "1",
217        "teardown": [
218            "$TC qdisc del dev $DUMMY handle 1: root",
219            "$IP link del dev $DUMMY type dummy"
220        ]
221    },
222    {
223        "id": "2a23",
224        "name": "Add ETS qdisc with 16 bands",
225        "category": [
226            "qdisc",
227            "ets"
228        ],
229        "setup": [
230            "$IP link add dev $DUMMY type dummy || /bin/true"
231        ],
232        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 16",
233        "expExitCode": "0",
234        "verifyCmd": "$TC qdisc show dev $DUMMY",
235        "matchPattern": "qdisc ets 1: root .* bands 16",
236        "matchCount": "1",
237        "teardown": [
238            "$TC qdisc del dev $DUMMY handle 1: root",
239            "$IP link del dev $DUMMY type dummy"
240        ]
241    },
242    {
243        "id": "8daf",
244        "name": "Add ETS qdisc with 17 bands",
245        "category": [
246            "qdisc",
247            "ets"
248        ],
249        "setup": [
250            "$IP link add dev $DUMMY type dummy || /bin/true"
251        ],
252        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 17",
253        "expExitCode": "1",
254        "verifyCmd": "$TC qdisc show dev $DUMMY",
255        "matchPattern": "qdisc ets",
256        "matchCount": "0",
257        "teardown": [
258            "$IP link del dev $DUMMY type dummy"
259        ]
260    },
261    {
262        "id": "7f95",
263        "name": "Add ETS qdisc with 17 strict",
264        "category": [
265            "qdisc",
266            "ets"
267        ],
268        "setup": [
269            "$IP link add dev $DUMMY type dummy || /bin/true"
270        ],
271        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 17",
272        "expExitCode": "1",
273        "verifyCmd": "$TC qdisc show dev $DUMMY",
274        "matchPattern": "qdisc ets",
275        "matchCount": "0",
276        "teardown": [
277            "$IP link del dev $DUMMY type dummy"
278        ]
279    },
280    {
281        "id": "837a",
282        "name": "Add ETS qdisc with 16 quanta",
283        "category": [
284            "qdisc",
285            "ets"
286        ],
287        "setup": [
288            "$IP link add dev $DUMMY type dummy || /bin/true"
289        ],
290        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16",
291        "expExitCode": "0",
292        "verifyCmd": "$TC qdisc show dev $DUMMY",
293        "matchPattern": "qdisc ets 1: root .* bands 16",
294        "matchCount": "1",
295        "teardown": [
296            "$TC qdisc del dev $DUMMY handle 1: root",
297            "$IP link del dev $DUMMY type dummy"
298        ]
299    },
300    {
301        "id": "65b6",
302        "name": "Add ETS qdisc with 17 quanta",
303        "category": [
304            "qdisc",
305            "ets"
306        ],
307        "setup": [
308            "$IP link add dev $DUMMY type dummy || /bin/true"
309        ],
310        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17",
311        "expExitCode": "2",
312        "verifyCmd": "$TC qdisc show dev $DUMMY",
313        "matchPattern": "qdisc ets",
314        "matchCount": "0",
315        "teardown": [
316            "$IP link del dev $DUMMY type dummy"
317        ]
318    },
319    {
320        "id": "b9e9",
321        "name": "Add ETS qdisc with 16 strict + quanta",
322        "category": [
323            "qdisc",
324            "ets"
325        ],
326        "setup": [
327            "$IP link add dev $DUMMY type dummy || /bin/true"
328        ],
329        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 8 quanta 1 2 3 4 5 6 7 8",
330        "expExitCode": "0",
331        "verifyCmd": "$TC qdisc show dev $DUMMY",
332        "matchPattern": "qdisc ets 1: root .* bands 16",
333        "matchCount": "1",
334        "teardown": [
335            "$TC qdisc del dev $DUMMY handle 1: root",
336            "$IP link del dev $DUMMY type dummy"
337        ]
338    },
339    {
340        "id": "9877",
341        "name": "Add ETS qdisc with 17 strict + quanta",
342        "category": [
343            "qdisc",
344            "ets"
345        ],
346        "setup": [
347            "$IP link add dev $DUMMY type dummy || /bin/true"
348        ],
349        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 9 quanta 1 2 3 4 5 6 7 8",
350        "expExitCode": "2",
351        "verifyCmd": "$TC qdisc show dev $DUMMY",
352        "matchPattern": "qdisc ets",
353        "matchCount": "0",
354        "teardown": [
355            "$IP link del dev $DUMMY type dummy"
356        ]
357    },
358    {
359        "id": "c696",
360        "name": "Add ETS qdisc with priomap",
361        "category": [
362            "qdisc",
363            "ets"
364        ],
365        "setup": [
366            "$IP link add dev $DUMMY type dummy || /bin/true"
367        ],
368        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 5 priomap 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0",
369        "expExitCode": "0",
370        "verifyCmd": "$TC qdisc show dev $DUMMY",
371        "matchPattern": "qdisc ets 1: root .*priomap 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0",
372        "matchCount": "1",
373        "teardown": [
374            "$TC qdisc del dev $DUMMY handle 1: root",
375            "$IP link del dev $DUMMY type dummy"
376        ]
377    },
378    {
379        "id": "30c4",
380        "name": "Add ETS qdisc with quanta + priomap",
381        "category": [
382            "qdisc",
383            "ets"
384        ],
385        "setup": [
386            "$IP link add dev $DUMMY type dummy || /bin/true"
387        ],
388        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 1000 2000 3000 4000 5000 priomap 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0",
389        "expExitCode": "0",
390        "verifyCmd": "$TC qdisc show dev $DUMMY",
391        "matchPattern": "qdisc ets 1: root .*quanta 1000 2000 3000 4000 5000 priomap 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0",
392        "matchCount": "1",
393        "teardown": [
394            "$TC qdisc del dev $DUMMY handle 1: root",
395            "$IP link del dev $DUMMY type dummy"
396        ]
397    },
398    {
399        "id": "e8ac",
400        "name": "Add ETS qdisc with strict + priomap",
401        "category": [
402            "qdisc",
403            "ets"
404        ],
405        "setup": [
406            "$IP link add dev $DUMMY type dummy || /bin/true"
407        ],
408        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 5 priomap 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0",
409        "expExitCode": "0",
410        "verifyCmd": "$TC qdisc show dev $DUMMY",
411        "matchPattern": "qdisc ets 1: root .*bands 5 strict 5 priomap 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0",
412        "matchCount": "1",
413        "teardown": [
414            "$TC qdisc del dev $DUMMY handle 1: root",
415            "$IP link del dev $DUMMY type dummy"
416        ]
417    },
418    {
419        "id": "5a7e",
420        "name": "Add ETS qdisc with quanta + strict + priomap",
421        "category": [
422            "qdisc",
423            "ets"
424        ],
425        "setup": [
426            "$IP link add dev $DUMMY type dummy || /bin/true"
427        ],
428        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 2 quanta 1000 2000 3000 priomap 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0",
429        "expExitCode": "0",
430        "verifyCmd": "$TC qdisc show dev $DUMMY",
431        "matchPattern": "qdisc ets 1: root .*strict 2 quanta 1000 2000 3000 priomap 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0",
432        "matchCount": "1",
433        "teardown": [
434            "$TC qdisc del dev $DUMMY handle 1: root",
435            "$IP link del dev $DUMMY type dummy"
436        ]
437    },
438    {
439        "id": "cb8b",
440        "name": "Show ETS class :1",
441        "category": [
442            "qdisc",
443            "ets"
444        ],
445        "setup": [
446            "$IP link add dev $DUMMY type dummy || /bin/true"
447        ],
448        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 4000 3000 2000",
449        "expExitCode": "0",
450        "verifyCmd": "$TC class show dev $DUMMY classid 1:1",
451        "matchPattern": "class ets 1:1 root quantum 4000",
452        "matchCount": "1",
453        "teardown": [
454            "$TC qdisc del dev $DUMMY handle 1: root",
455            "$IP link del dev $DUMMY type dummy"
456        ]
457    },
458    {
459        "id": "1b4e",
460        "name": "Show ETS class :2",
461        "category": [
462            "qdisc",
463            "ets"
464        ],
465        "setup": [
466            "$IP link add dev $DUMMY type dummy || /bin/true"
467        ],
468        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 4000 3000 2000",
469        "expExitCode": "0",
470        "verifyCmd": "$TC class show dev $DUMMY classid 1:2",
471        "matchPattern": "class ets 1:2 root quantum 3000",
472        "matchCount": "1",
473        "teardown": [
474            "$TC qdisc del dev $DUMMY handle 1: root",
475            "$IP link del dev $DUMMY type dummy"
476        ]
477    },
478    {
479        "id": "f642",
480        "name": "Show ETS class :3",
481        "category": [
482            "qdisc",
483            "ets"
484        ],
485        "setup": [
486            "$IP link add dev $DUMMY type dummy || /bin/true"
487        ],
488        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 4000 3000 2000",
489        "expExitCode": "0",
490        "verifyCmd": "$TC class show dev $DUMMY classid 1:3",
491        "matchPattern": "class ets 1:3 root quantum 2000",
492        "matchCount": "1",
493        "teardown": [
494            "$TC qdisc del dev $DUMMY handle 1: root",
495            "$IP link del dev $DUMMY type dummy"
496        ]
497    },
498    {
499        "id": "0a5f",
500        "name": "Show ETS strict class",
501        "category": [
502            "qdisc",
503            "ets"
504        ],
505        "setup": [
506            "$IP link add dev $DUMMY type dummy || /bin/true"
507        ],
508        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 3",
509        "expExitCode": "0",
510        "verifyCmd": "$TC class show dev $DUMMY classid 1:1",
511        "matchPattern": "class ets 1:1 root $",
512        "matchCount": "1",
513        "teardown": [
514            "$TC qdisc del dev $DUMMY handle 1: root",
515            "$IP link del dev $DUMMY type dummy"
516        ]
517    },
518    {
519        "id": "f7c8",
520        "name": "Add ETS qdisc with too many quanta",
521        "category": [
522            "qdisc",
523            "ets"
524        ],
525        "setup": [
526            "$IP link add dev $DUMMY type dummy || /bin/true"
527        ],
528        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 2 quanta 1000 2000 3000",
529        "expExitCode": "1",
530        "verifyCmd": "$TC qdisc show dev $DUMMY",
531        "matchPattern": "qdisc ets",
532        "matchCount": "0",
533        "teardown": [
534            "$IP link del dev $DUMMY type dummy"
535        ]
536    },
537    {
538        "id": "2389",
539        "name": "Add ETS qdisc with too many strict",
540        "category": [
541            "qdisc",
542            "ets"
543        ],
544        "setup": [
545            "$IP link add dev $DUMMY type dummy || /bin/true"
546        ],
547        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 2 strict 3",
548        "expExitCode": "1",
549        "verifyCmd": "$TC qdisc show dev $DUMMY",
550        "matchPattern": "qdisc ets",
551        "matchCount": "0",
552        "teardown": [
553            "$IP link del dev $DUMMY type dummy"
554        ]
555    },
556    {
557        "id": "fe3c",
558        "name": "Add ETS qdisc with too many strict + quanta",
559        "category": [
560            "qdisc",
561            "ets"
562        ],
563        "setup": [
564            "$IP link add dev $DUMMY type dummy || /bin/true"
565        ],
566        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 4 strict 2 quanta 1000 2000 3000",
567        "expExitCode": "1",
568        "verifyCmd": "$TC qdisc show dev $DUMMY",
569        "matchPattern": "qdisc ets",
570        "matchCount": "0",
571        "teardown": [
572            "$IP link del dev $DUMMY type dummy"
573        ]
574    },
575    {
576        "id": "cb04",
577        "name": "Add ETS qdisc with excess priomap elements",
578        "category": [
579            "qdisc",
580            "ets"
581        ],
582        "setup": [
583            "$IP link add dev $DUMMY type dummy || /bin/true"
584        ],
585        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 5 priomap 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2",
586        "expExitCode": "1",
587        "verifyCmd": "$TC qdisc show dev $DUMMY",
588        "matchPattern": "qdisc ets",
589        "matchCount": "0",
590        "teardown": [
591            "$IP link del dev $DUMMY type dummy"
592        ]
593    },
594    {
595        "id": "c32e",
596        "name": "Add ETS qdisc with priomap above bands",
597        "category": [
598            "qdisc",
599            "ets"
600        ],
601        "setup": [
602            "$IP link add dev $DUMMY type dummy || /bin/true"
603        ],
604        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 2 priomap 0 1 2",
605        "expExitCode": "1",
606        "verifyCmd": "$TC qdisc show dev $DUMMY",
607        "matchPattern": "qdisc ets",
608        "matchCount": "0",
609        "teardown": [
610            "$IP link del dev $DUMMY type dummy"
611        ]
612    },
613    {
614        "id": "744c",
615        "name": "Add ETS qdisc with priomap above quanta",
616        "category": [
617            "qdisc",
618            "ets"
619        ],
620        "setup": [
621            "$IP link add dev $DUMMY type dummy || /bin/true"
622        ],
623        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 1000 500 priomap 0 1 2",
624        "expExitCode": "1",
625        "verifyCmd": "$TC qdisc show dev $DUMMY",
626        "matchPattern": "qdisc ets",
627        "matchCount": "0",
628        "teardown": [
629            "$IP link del dev $DUMMY type dummy"
630        ]
631    },
632    {
633        "id": "7b33",
634        "name": "Add ETS qdisc with priomap above strict",
635        "category": [
636            "qdisc",
637            "ets"
638        ],
639        "setup": [
640            "$IP link add dev $DUMMY type dummy || /bin/true"
641        ],
642        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 2 priomap 0 1 2",
643        "expExitCode": "1",
644        "verifyCmd": "$TC qdisc show dev $DUMMY",
645        "matchPattern": "qdisc ets",
646        "matchCount": "0",
647        "teardown": [
648            "$IP link del dev $DUMMY type dummy"
649        ]
650    },
651    {
652        "id": "dbe6",
653        "name": "Add ETS qdisc with priomap above strict + quanta",
654        "category": [
655            "qdisc",
656            "ets"
657        ],
658        "setup": [
659            "$IP link add dev $DUMMY type dummy || /bin/true"
660        ],
661        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets strict 1 quanta 1000 500 priomap 0 1 2 3",
662        "expExitCode": "1",
663        "verifyCmd": "$TC qdisc show dev $DUMMY",
664        "matchPattern": "qdisc ets",
665        "matchCount": "0",
666        "teardown": [
667            "$IP link del dev $DUMMY type dummy"
668        ]
669    },
670    {
671        "id": "bdb2",
672        "name": "Add ETS qdisc with priomap within bands with strict + quanta",
673        "category": [
674            "qdisc",
675            "ets"
676        ],
677        "setup": [
678            "$IP link add dev $DUMMY type dummy || /bin/true"
679        ],
680        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 4 strict 1 quanta 1000 500 priomap 0 1 2 3",
681        "expExitCode": "0",
682        "verifyCmd": "$TC qdisc show dev $DUMMY",
683        "matchPattern": "qdisc ets",
684        "matchCount": "1",
685        "teardown": [
686            "$IP link del dev $DUMMY type dummy"
687        ]
688    },
689    {
690        "id": "39a3",
691        "name": "Add ETS qdisc with priomap above bands with strict + quanta",
692        "category": [
693            "qdisc",
694            "ets"
695        ],
696        "setup": [
697            "$IP link add dev $DUMMY type dummy || /bin/true"
698        ],
699        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 4 strict 1 quanta 1000 500 priomap 0 1 2 3 4",
700        "expExitCode": "1",
701        "verifyCmd": "$TC qdisc show dev $DUMMY",
702        "matchPattern": "qdisc ets",
703        "matchCount": "0",
704        "teardown": [
705            "$IP link del dev $DUMMY type dummy"
706        ]
707    },
708    {
709        "id": "557c",
710        "name": "Unset priorities default to the last band",
711        "category": [
712            "qdisc",
713            "ets"
714        ],
715        "setup": [
716            "$IP link add dev $DUMMY type dummy || /bin/true"
717        ],
718        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 4 priomap 0 0 0 0",
719        "expExitCode": "0",
720        "verifyCmd": "$TC qdisc show dev $DUMMY",
721        "matchPattern": "qdisc ets .*priomap 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3",
722        "matchCount": "1",
723        "teardown": [
724            "$IP link del dev $DUMMY type dummy"
725        ]
726    },
727    {
728        "id": "a347",
729        "name": "Unset priorities default to the last band -- no priomap",
730        "category": [
731            "qdisc",
732            "ets"
733        ],
734        "setup": [
735            "$IP link add dev $DUMMY type dummy || /bin/true"
736        ],
737        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 4",
738        "expExitCode": "0",
739        "verifyCmd": "$TC qdisc show dev $DUMMY",
740        "matchPattern": "qdisc ets .*priomap 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3",
741        "matchCount": "1",
742        "teardown": [
743            "$IP link del dev $DUMMY type dummy"
744        ]
745    },
746    {
747        "id": "39c4",
748        "name": "Add ETS qdisc with too few bands",
749        "category": [
750            "qdisc",
751            "ets"
752        ],
753        "setup": [
754            "$IP link add dev $DUMMY type dummy || /bin/true"
755        ],
756        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 0",
757        "expExitCode": "1",
758        "verifyCmd": "$TC qdisc show dev $DUMMY",
759        "matchPattern": "qdisc ets",
760        "matchCount": "0",
761        "teardown": [
762            "$IP link del dev $DUMMY type dummy"
763        ]
764    },
765    {
766        "id": "930b",
767        "name": "Add ETS qdisc with too many bands",
768        "category": [
769            "qdisc",
770            "ets"
771        ],
772        "setup": [
773            "$IP link add dev $DUMMY type dummy || /bin/true"
774        ],
775        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets bands 17",
776        "expExitCode": "1",
777        "verifyCmd": "$TC qdisc show dev $DUMMY",
778        "matchPattern": "qdisc ets",
779        "matchCount": "0",
780        "teardown": [
781            "$IP link del dev $DUMMY type dummy"
782        ]
783    },
784    {
785        "id": "406a",
786        "name": "Add ETS qdisc without parameters",
787        "category": [
788            "qdisc",
789            "ets"
790        ],
791        "setup": [
792            "$IP link add dev $DUMMY type dummy || /bin/true"
793        ],
794        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets",
795        "expExitCode": "1",
796        "verifyCmd": "$TC qdisc show dev $DUMMY",
797        "matchPattern": "qdisc ets",
798        "matchCount": "0",
799        "teardown": [
800            "$IP link del dev $DUMMY type dummy"
801        ]
802    },
803    {
804        "id": "e51a",
805        "name": "Zero element in quanta",
806        "category": [
807            "qdisc",
808            "ets"
809        ],
810        "setup": [
811            "$IP link add dev $DUMMY type dummy || /bin/true"
812        ],
813        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 1000 0 800 700",
814        "expExitCode": "1",
815        "verifyCmd": "$TC qdisc show dev $DUMMY",
816        "matchPattern": "qdisc ets",
817        "matchCount": "0",
818        "teardown": [
819            "$IP link del dev $DUMMY type dummy"
820        ]
821    },
822    {
823        "id": "e7f2",
824        "name": "Sole zero element in quanta",
825        "category": [
826            "qdisc",
827            "ets"
828        ],
829        "setup": [
830            "$IP link add dev $DUMMY type dummy || /bin/true"
831        ],
832        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta 0",
833        "expExitCode": "1",
834        "verifyCmd": "$TC qdisc show dev $DUMMY",
835        "matchPattern": "qdisc ets",
836        "matchCount": "0",
837        "teardown": [
838            "$IP link del dev $DUMMY type dummy"
839        ]
840    },
841    {
842        "id": "d6e6",
843        "name": "No values after the quanta keyword",
844        "category": [
845            "qdisc",
846            "ets"
847        ],
848        "setup": [
849            "$IP link add dev $DUMMY type dummy || /bin/true"
850        ],
851        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root ets quanta",
852        "expExitCode": "255",
853        "verifyCmd": "$TC qdisc show dev $DUMMY",
854        "matchPattern": "qdisc ets",
855        "matchCount": "0",
856        "teardown": [
857            "$IP link del dev $DUMMY type dummy"
858        ]
859    },
860    {
861        "id": "28c6",
862        "name": "Change ETS band quantum",
863        "category": [
864            "qdisc",
865            "ets"
866        ],
867        "setup": [
868            "$IP link add dev $DUMMY type dummy || /bin/true",
869            "$TC qdisc add dev $DUMMY handle 1: root ets quanta 1000 2000 3000"
870        ],
871        "cmdUnderTest": "$TC class change dev $DUMMY classid 1:1 ets quantum 1500",
872        "expExitCode": "0",
873        "verifyCmd": "$TC qdisc show dev $DUMMY",
874        "matchPattern": "qdisc ets 1: root .*quanta 1500 2000 3000 priomap ",
875        "matchCount": "1",
876        "teardown": [
877            "$IP link del dev $DUMMY type dummy"
878        ]
879    },
880    {
881        "id": "4714",
882        "name": "Change ETS band without quantum",
883        "category": [
884            "qdisc",
885            "ets"
886        ],
887        "setup": [
888            "$IP link add dev $DUMMY type dummy || /bin/true",
889            "$TC qdisc add dev $DUMMY handle 1: root ets quanta 1000 2000 3000"
890        ],
891        "cmdUnderTest": "$TC class change dev $DUMMY classid 1:1 ets",
892        "expExitCode": "0",
893        "verifyCmd": "$TC qdisc show dev $DUMMY",
894        "matchPattern": "qdisc ets 1: root .*quanta 1000 2000 3000 priomap ",
895        "matchCount": "1",
896        "teardown": [
897            "$IP link del dev $DUMMY type dummy"
898        ]
899    },
900    {
901        "id": "6979",
902        "name": "Change quantum of a strict ETS band",
903        "category": [
904            "qdisc",
905            "ets"
906        ],
907        "setup": [
908            "$IP link add dev $DUMMY type dummy || /bin/true",
909            "$TC qdisc add dev $DUMMY handle 1: root ets strict 5"
910        ],
911        "cmdUnderTest": "$TC class change dev $DUMMY classid 1:2 ets quantum 1500",
912        "expExitCode": "2",
913        "verifyCmd": "$TC qdisc show dev $DUMMY",
914        "matchPattern": "qdisc ets .*bands 5 .*strict 5",
915        "matchCount": "1",
916        "teardown": [
917            "$IP link del dev $DUMMY type dummy"
918        ]
919    },
920    {
921        "id": "9a7d",
922        "name": "Change ETS strict band without quantum",
923        "category": [
924            "qdisc",
925            "ets"
926        ],
927        "setup": [
928            "$IP link add dev $DUMMY type dummy || /bin/true",
929            "$TC qdisc add dev $DUMMY handle 1: root ets strict 5"
930        ],
931        "cmdUnderTest": "$TC class change dev $DUMMY classid 1:2 ets",
932        "expExitCode": "0",
933        "verifyCmd": "$TC qdisc show dev $DUMMY",
934        "matchPattern": "qdisc ets .*bands 5 .*strict 5",
935        "matchCount": "1",
936        "teardown": [
937            "$IP link del dev $DUMMY type dummy"
938        ]
939    }
940]
941