1[ 2 { 3 "id": "ddd9", 4 "name": "Add prio qdisc on egress", 5 "category": [ 6 "qdisc", 7 "prio" 8 ], 9 "setup": [ 10 "$IP link add dev $DUMMY type dummy || /bin/true" 11 ], 12 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio", 13 "expExitCode": "0", 14 "verifyCmd": "$TC qdisc show dev $DUMMY", 15 "matchPattern": "qdisc prio 1: root", 16 "matchCount": "1", 17 "teardown": [ 18 "$TC qdisc del dev $DUMMY handle 1: root prio", 19 "$IP link del dev $DUMMY type dummy" 20 ] 21 }, 22 { 23 "id": "aa71", 24 "name": "Add prio qdisc on egress with handle of maximum value", 25 "category": [ 26 "qdisc", 27 "prio" 28 ], 29 "setup": [ 30 "$IP link add dev $DUMMY type dummy || /bin/true" 31 ], 32 "cmdUnderTest": "$TC qdisc add dev $DUMMY root handle ffff: prio", 33 "expExitCode": "0", 34 "verifyCmd": "$TC qdisc show dev $DUMMY", 35 "matchPattern": "qdisc prio ffff: root", 36 "matchCount": "1", 37 "teardown": [ 38 "$IP link del dev $DUMMY type dummy" 39 ] 40 }, 41 { 42 "id": "db37", 43 "name": "Add prio qdisc on egress with invalid handle exceeding maximum value", 44 "category": [ 45 "qdisc", 46 "prio" 47 ], 48 "setup": [ 49 "$IP link add dev $DUMMY type dummy || /bin/true" 50 ], 51 "cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 10000: prio", 52 "expExitCode": "255", 53 "verifyCmd": "$TC qdisc show dev $DUMMY", 54 "matchPattern": "qdisc prio 10000: root", 55 "matchCount": "0", 56 "teardown": [ 57 "$IP link del dev $DUMMY type dummy" 58 ] 59 }, 60 { 61 "id": "39d8", 62 "name": "Add prio qdisc on egress with unsupported argument", 63 "category": [ 64 "qdisc", 65 "prio" 66 ], 67 "setup": [ 68 "$IP link add dev $DUMMY type dummy || /bin/true" 69 ], 70 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio foorbar", 71 "expExitCode": "1", 72 "verifyCmd": "$TC qdisc show dev $DUMMY", 73 "matchPattern": "qdisc prio 1: root", 74 "matchCount": "0", 75 "teardown": [ 76 "$IP link del dev $DUMMY type dummy" 77 ] 78 }, 79 { 80 "id": "5769", 81 "name": "Add prio qdisc on egress with 4 bands and new priomap", 82 "category": [ 83 "qdisc", 84 "prio" 85 ], 86 "setup": [ 87 "$IP link add dev $DUMMY type dummy || /bin/true" 88 ], 89 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 4 priomap 1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0", 90 "expExitCode": "0", 91 "verifyCmd": "$TC qdisc show dev $DUMMY", 92 "matchPattern": "qdisc prio 1: root.*bands 4 priomap.*1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0", 93 "matchCount": "1", 94 "teardown": [ 95 "$TC qdisc del dev $DUMMY handle 1: root prio", 96 "$IP link del dev $DUMMY type dummy" 97 ] 98 }, 99 { 100 "id": "fe0f", 101 "name": "Add prio qdisc on egress with 4 bands and priomap exceeding TC_PRIO_MAX entries", 102 "category": [ 103 "qdisc", 104 "prio" 105 ], 106 "setup": [ 107 "$IP link add dev $DUMMY type dummy || /bin/true" 108 ], 109 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 4 priomap 1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0 1 1", 110 "expExitCode": "1", 111 "verifyCmd": "$TC qdisc show dev $DUMMY", 112 "matchPattern": "qdisc prio 1: root.*bands 4 priomap.*1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0 1 1", 113 "matchCount": "0", 114 "teardown": [ 115 "$IP link del dev $DUMMY type dummy" 116 ] 117 }, 118 { 119 "id": "1f91", 120 "name": "Add prio qdisc on egress with 4 bands and priomap's values exceeding bands number", 121 "category": [ 122 "qdisc", 123 "prio" 124 ], 125 "setup": [ 126 "$IP link add dev $DUMMY type dummy || /bin/true" 127 ], 128 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 4 priomap 1 1 2 2 7 5 0 0 1 2 3 0 0 0 0 0", 129 "expExitCode": "1", 130 "verifyCmd": "$TC qdisc show dev $DUMMY", 131 "matchPattern": "qdisc prio 1: root.*bands 4 priomap.*1 1 2 2 7 5 0 0 1 2 3 0 0 0 0 0", 132 "matchCount": "0", 133 "teardown": [ 134 "$IP link del dev $DUMMY type dummy" 135 ] 136 }, 137 { 138 "id": "d248", 139 "name": "Add prio qdisc on egress with invalid bands value (< 2)", 140 "category": [ 141 "qdisc", 142 "prio" 143 ], 144 "setup": [ 145 "$IP link add dev $DUMMY type dummy || /bin/true" 146 ], 147 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 1 priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", 148 "expExitCode": "2", 149 "verifyCmd": "$TC qdisc show dev $DUMMY", 150 "matchPattern": "qdisc prio 1: root.*bands 1 priomap.*0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", 151 "matchCount": "0", 152 "teardown": [ 153 "$IP link del dev $DUMMY type dummy" 154 ] 155 }, 156 { 157 "id": "1d0e", 158 "name": "Add prio qdisc on egress with invalid bands value exceeding TCQ_PRIO_BANDS", 159 "category": [ 160 "qdisc", 161 "prio" 162 ], 163 "setup": [ 164 "$IP link add dev $DUMMY type dummy || /bin/true" 165 ], 166 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 1024 priomap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16", 167 "expExitCode": "2", 168 "verifyCmd": "$TC qdisc show dev $DUMMY", 169 "matchPattern": "qdisc prio 1: root.*bands 1024 priomap.*1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16", 170 "matchCount": "0", 171 "teardown": [ 172 "$IP link del dev $DUMMY type dummy" 173 ] 174 }, 175 { 176 "id": "1971", 177 "name": "Replace default prio qdisc on egress with 8 bands and new priomap", 178 "category": [ 179 "qdisc", 180 "prio" 181 ], 182 "setup": [ 183 "$IP link add dev $DUMMY type dummy || /bin/true", 184 "$TC qdisc add dev $DUMMY handle 1: root prio" 185 ], 186 "cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root prio bands 8 priomap 1 1 2 2 3 3 4 4 5 5 6 6 7 7 0 0", 187 "expExitCode": "0", 188 "verifyCmd": "$TC qdisc show dev $DUMMY", 189 "matchPattern": "qdisc prio 1: root.*bands 8 priomap.*1 1 2 2 3 3 4 4 5 5 6 6 7 7 0 0", 190 "matchCount": "1", 191 "teardown": [ 192 "$TC qdisc del dev $DUMMY handle 1: root prio", 193 "$IP link del dev $DUMMY type dummy" 194 ] 195 }, 196 { 197 "id": "d88a", 198 "name": "Add duplicate prio qdisc on egress", 199 "category": [ 200 "qdisc", 201 "prio" 202 ], 203 "setup": [ 204 "$IP link add dev $DUMMY type dummy || /bin/true", 205 "$TC qdisc add dev $DUMMY handle 1: root prio" 206 ], 207 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio", 208 "expExitCode": "2", 209 "verifyCmd": "$TC qdisc show dev $DUMMY", 210 "matchPattern": "qdisc prio 1: root", 211 "matchCount": "1", 212 "teardown": [ 213 "$TC qdisc del dev $DUMMY handle 1: root prio", 214 "$IP link del dev $DUMMY type dummy" 215 ] 216 }, 217 { 218 "id": "5948", 219 "name": "Delete nonexistent prio qdisc", 220 "category": [ 221 "qdisc", 222 "prio" 223 ], 224 "setup": [ 225 "$IP link add dev $DUMMY type dummy || /bin/true" 226 ], 227 "cmdUnderTest": "$TC qdisc del dev $DUMMY root handle 1: prio", 228 "expExitCode": "2", 229 "verifyCmd": "$TC qdisc show dev $DUMMY", 230 "matchPattern": "qdisc prio 1: root", 231 "matchCount": "0", 232 "teardown": [ 233 "$IP link del dev $DUMMY type dummy" 234 ] 235 }, 236 { 237 "id": "6c0a", 238 "name": "Add prio qdisc on egress with invalid format for handles", 239 "category": [ 240 "qdisc", 241 "prio" 242 ], 243 "setup": [ 244 "$IP link add dev $DUMMY type dummy || /bin/true" 245 ], 246 "cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 123^ prio", 247 "expExitCode": "255", 248 "verifyCmd": "$TC qdisc show dev $DUMMY", 249 "matchPattern": "qdisc prio 123 root", 250 "matchCount": "0", 251 "teardown": [ 252 "$IP link del dev $DUMMY type dummy" 253 ] 254 }, 255 { 256 "id": "0175", 257 "name": "Delete prio qdisc twice", 258 "category": [ 259 "qdisc", 260 "prio" 261 ], 262 "setup": [ 263 "$IP link add dev $DUMMY type dummy || /bin/true", 264 "$TC qdisc add dev $DUMMY root handle 1: prio", 265 "$TC qdisc del dev $DUMMY root handle 1: prio" 266 ], 267 "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root prio", 268 "expExitCode": "2", 269 "verifyCmd": "$TC qdisc show dev $DUMMY", 270 "matchPattern": "qdisc ingress ffff:", 271 "matchCount": "0", 272 "teardown": [ 273 "$IP link del dev $DUMMY type dummy" 274 ] 275 } 276] 277