1[
2    {
3        "id": "900c",
4        "name": "Create pfifo_fast with default setting",
5        "category": [
6            "qdisc",
7            "pfifo_fast"
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 pfifo_fast",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $DUMMY",
18        "matchPattern": "qdisc pfifo_fast 1: root refcnt [0-9]+ bands 3 priomap",
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": "7470",
27        "name": "Dump pfifo_fast stats",
28        "category": [
29            "qdisc",
30            "pfifo_fast"
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 pfifo_fast",
39        "expExitCode": "0",
40        "verifyCmd": "$TC -s qdisc show dev $DUMMY",
41        "matchPattern": "Sent.*bytes.*pkt \\(dropped.*overlimits.*requeues .*\\)",
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": "b974",
50        "name": "Replace pfifo_fast with different handle",
51        "category": [
52            "qdisc",
53            "pfifo_fast"
54        ],
55        "plugins": {
56            "requires": "nsPlugin"
57        },
58        "setup": [
59            "$IP link add dev $DUMMY type dummy || /bin/true",
60            "$TC qdisc add dev $DUMMY handle 1: root pfifo_fast"
61        ],
62        "cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 2: root pfifo_fast",
63        "expExitCode": "0",
64        "verifyCmd": "$TC qdisc show dev $DUMMY",
65        "matchPattern": "qdisc pfifo_fast 2: root refcnt [0-9]+ bands 3 priomap",
66        "matchCount": "1",
67        "teardown": [
68            "$TC qdisc del dev $DUMMY handle 2: root",
69            "$IP link del dev $DUMMY type dummy"
70        ]
71    },
72    {
73        "id": "3240",
74        "name": "Delete pfifo_fast with valid handle",
75        "category": [
76            "qdisc",
77            "pfifo_fast"
78        ],
79        "plugins": {
80            "requires": "nsPlugin"
81        },
82        "setup": [
83            "$IP link add dev $DUMMY type dummy || /bin/true",
84            "$TC qdisc add dev $DUMMY handle 1: root pfifo_fast"
85        ],
86        "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
87        "expExitCode": "0",
88        "verifyCmd": "$TC qdisc show dev $DUMMY",
89        "matchPattern": "qdisc pfifo_fast 1: root refcnt [0-9]+ bands 3 priomap",
90        "matchCount": "0",
91        "teardown": [
92            "$IP link del dev $DUMMY type dummy"
93        ]
94    },
95    {
96        "id": "4385",
97        "name": "Delete pfifo_fast with invalid handle",
98        "category": [
99            "qdisc",
100            "pfifo_fast"
101        ],
102        "plugins": {
103            "requires": "nsPlugin"
104        },
105        "setup": [
106            "$IP link add dev $DUMMY type dummy || /bin/true",
107            "$TC qdisc add dev $DUMMY handle 1: root pfifo_fast"
108        ],
109        "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 2: root",
110        "expExitCode": "2",
111        "verifyCmd": "$TC qdisc show dev $DUMMY",
112        "matchPattern": "qdisc pfifo_fast 1: root refcnt [0-9]+ bands 3 priomap",
113        "matchCount": "1",
114        "teardown": [
115            "$TC qdisc del dev $DUMMY handle 1: root",
116            "$IP link del dev $DUMMY type dummy"
117        ]
118    }
119]
120