/usr/src/openvswitch-1.4.0/tests/stp.at is in openvswitch-datapath-dkms 1.4.0-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | AT_BANNER([Spanning Tree Protocol unit tests])
AT_SETUP([STP example from IEEE 802.1D-1998])
AT_KEYWORDS([STP])
AT_DATA([test-stp-ieee802.1d-1998],
[bridge 0 0x42 = a b
bridge 1 0x97 = c:5 a d:5
bridge 2 0x45 = b e
bridge 3 0x57 = b:5 e:5
bridge 4 0x83 = a:5 e:5
run 1000
check 0 = root
check 1 = F F:10 F
check 2 = F:10 B
check 3 = F:5 F
check 4 = F:5 B
])
AT_CHECK([test-stp test-stp-ieee802.1d-1998])
AT_CLEANUP
AT_SETUP([STP example from IEEE 802.1D-2004 figures 17.4 and 17.5])
AT_KEYWORDS([STP])
AT_DATA([test-stp-ieee802.1d-2004-fig17.4],
[bridge 0 0x111 = a b e c
bridge 1 0x222 = a b d f
bridge 2 0x333 = c d l j h g
bridge 3 0x444 = e f n m k i
bridge 4 0x555 = g i 0 0
bridge 5 0x666 = h k 0 0
bridge 6 0x777 = j m 0 0
bridge 7 0x888 = l n 0 0
run 1000
check 0 = root
check 1 = F:10 B F F
check 2 = F:10 B F F F F
check 3 = F:10 B F F F F
check 4 = F:20 B F F
check 5 = F:20 B F F
check 6 = F:20 B F F
check 7 = F:20 B F F
# Now connect two ports of bridge 7 to the same LAN.
bridge 7 = l n o o
# Same results except for bridge 7:
run 1000
check 0 = root
check 1 = F:10 B F F
check 2 = F:10 B F F F F
check 3 = F:10 B F F F F
check 4 = F:20 B F F
check 5 = F:20 B F F
check 6 = F:20 B F F
check 7 = F:20 B F B
])
AT_CHECK([test-stp test-stp-ieee802.1d-2004-fig17.4])
AT_CLEANUP
AT_SETUP([STP example from IEEE 802.1D-2004 figure 17.6])
AT_KEYWORDS([STP])
AT_DATA([test-stp-ieee802.1d-2004-fig17.6],
[bridge 0 0x111 = a b l
bridge 1 0x222 = b c d
bridge 2 0x333 = d e f
bridge 3 0x444 = f g h
bridge 4 0x555 = j h i
bridge 5 0x666 = l j k
run 1000
check 0 = root
check 1 = F:10 F F
check 2 = F:20 F F
check 3 = F:30 F B
check 4 = F:20 F F
check 5 = F:10 F F
])
AT_CHECK([test-stp test-stp-ieee802.1d-2004-fig17.6])
AT_CLEANUP
AT_SETUP([STP example from IEEE 802.1D-2004 figure 17.7])
AT_KEYWORDS([STP])
AT_DATA([test-stp-ieee802.1d-2004-fig17.7],
[bridge 0 0xaa = b
bridge 1 0x111 = a b d f h g e c
bridge 2 0x222 = g h j l n m k i
run 1000
check 0 = root
check 1 = F F:10 F F F F F F
check 2 = B F:20 F F F F F F
# This is not the port priority change described in that figure,
# but I don't understand what port priority change would cause
# that change.
bridge 2 = g X j l n m k i
run 1000
check 0 = root
check 1 = F F:10 F F F F F F
check 2 = F:20 D F F F F F F
])
AT_CHECK([test-stp test-stp-ieee802.1d-2004-fig17.7])
AT_CLEANUP
AT_SETUP([STP.io.1.1: Link Failure])
AT_KEYWORDS([STP])
AT_DATA([test-stp-iol-io-1.1],
[# This test file approximates the following test from "Bridge
# Functions Consortium Spanning Tree Interoperability Test Suite
# Version 1.5":
#
# STP.io.1.1: Link Failure
bridge 0 0x111 = a b c
bridge 1 0x222 = a b c
run 1000
check 0 = root
check 1 = F:10 B B
bridge 1 = 0 _ _
run 1000
check 0 = root
check 1 = F F:10 B
bridge 1 = X _ _
run 1000
check 0 = root
check 1 = D F:10 B
bridge 1 = _ 0 _
run 1000
check 0 = root
check 1 = D F F:10
bridge 1 = _ X _
run 1000
check 0 = root
check 1 = D D F:10
])
AT_CHECK([test-stp test-stp-iol-io-1.1])
AT_CLEANUP
AT_SETUP([STP.io.1.2: Repeated Network])
AT_KEYWORDS([STP])
AT_DATA([test-stp-iol-io-1.2],
[# This test file approximates the following test from "Bridge
# Functions Consortium Spanning Tree Interoperability Test Suite
# Version 1.5":
# STP.io.1.2: Repeated Network
bridge 0 0x111 = a a
bridge 1 0x222 = a a
run 1000
check 0 = rootid:0x111 F B
check 1 = rootid:0x111 F:10 B
bridge 1 = a^0x90 _
run 1000
check 0 = rootid:0x111 F B
check 1 = rootid:0x111 B F:10
])
AT_CHECK([test-stp test-stp-iol-io-1.2])
AT_CLEANUP
AT_SETUP([STP.io.1.4: Network Initialization])
AT_KEYWORDS([STP])
AT_DATA([test-stp-iol-io-1.4],
[# This test file approximates the following test from "Bridge
# Functions Consortium Spanning Tree Interoperability Test Suite
# Version 1.5":
# STP.io.1.4: Network Initialization
bridge 0 0x111 = a b c
bridge 1 0x222 = b d e
bridge 2 0x333 = a d f
bridge 3 0x444 = c e f
run 1000
check 0 = root
check 1 = F:10 F F
check 2 = F:10 B F
check 3 = F:10 B B
])
AT_CHECK([test-stp test-stp-iol-io-1.4])
AT_CLEANUP
AT_SETUP([STP.io.1.5: Topology Change])
AT_KEYWORDS([STP])
AT_DATA([test-stp-iol-io-1.5],
[# This test file approximates the following test from "Bridge
# Functions Consortium Spanning Tree Interoperability Test Suite
# Version 1.5":
# STP.io.1.5: Topology Change
bridge 0 0x111 = a b d c
bridge 1 0x222 = a b f e
bridge 2 0x333 = c d g h
bridge 3 0x444 = e f g h
run 1000
check 0 = root
check 1 = F:10 B F F
check 2 = B F:10 F F
check 3 = B F:20 B B
bridge 1^0x7000
run 1000
check 0 = F:10 B F F
check 1 = root
check 2 = B F:20 B B
check 3 = B F:10 F F
bridge 2^0x6000
run 1000
check 0 = F F B F:10
check 1 = F:20 B B B
check 2 = root
check 3 = F F F:10 B
bridge 3^0x5000
run 1000
check 0 = B B B F:20
check 1 = F F B F:10
check 2 = F F F:10 B
check 3 = root
bridge 0^0x4000
bridge 1^0x4001
bridge 2^0x4002
bridge 3^0x4003
run 1000
check 0 = root
check 1 = F:10 B F F
check 2 = B F:10 F F
check 3 = B F:20 B B
])
AT_CHECK([test-stp test-stp-iol-io-1.5])
AT_CLEANUP
AT_SETUP([STP.op.1.1 and STP.op.1.2])
AT_KEYWORDS([STP])
AT_DATA([test-stp-iol-op-1.1],
[# This test file approximates the following tests from "Bridge
# Functions Consortium Spanning Tree Protocol Operations Test Suite
# Version 2.3":
# Test STP.op.1.1: Root ID Initialized to Bridge ID
# Test STP.op.1.2: Root Path Cost Initialized to Zero
bridge 0 0x123 =
check 0 = root
])
AT_CHECK([test-stp test-stp-iol-op-1.1])
AT_CLEANUP
AT_SETUP([STP.op.1.4: All Ports Initialized to Designated Ports])
AT_KEYWORDS([STP])
AT_DATA([test-stp-iol-op-1.4],
[# This test file approximates the following test from "Bridge
# Functions Consortium Spanning Tree Protocol Operations Test Suite
# Version 2.3":
# Test STP.op.1.4: All Ports Initialized to Designated Ports
bridge 0 0x123 = a b c d e f
check 0 = Li Li Li Li Li Li
run 1000
check 0 = F F F F F F
])
AT_CHECK([test-stp test-stp-iol-op-1.4])
AT_CLEANUP
AT_SETUP([STP.op.3.1: Root Bridge Selection: Root ID Values])
AT_KEYWORDS([STP])
AT_DATA([test-stp-iol-op-3.1],
[# This test file approximates the following test from "Bridge
# Functions Consortium Spanning Tree Protocol Operations Test Suite
# Version 2.3":
# Test STP.op.3.1: Root Bridge Selection: Root ID Values
bridge 0 0x111 = a
bridge 1 0x222 = a
check 0 = rootid:0x111 Li
check 1 = rootid:0x222 Li
run 1000
check 0 = rootid:0x111 root
check 1 = rootid:0x111 F:10
])
AT_CHECK([test-stp test-stp-iol-op-3.1])
AT_CLEANUP
AT_SETUP([STP.op.3.3: Root Bridge Selection: Bridge ID Values])
AT_KEYWORDS([STP])
AT_DATA([test-stp-iol-op-3.3],
[# This test file approximates the following test from "Bridge
# Functions Consortium Spanning Tree Protocol Operations Test Suite
# Version 2.3":
# Test STP.op.3.3: Root Bridge Selection: Bridge ID Values
bridge 0 0x333^0x6000 = a
bridge 1 0x222^0x7000 = b
bridge 2 0x111 = a b
run 1000
check 0 = rootid:0x333^0x6000 root
check 1 = rootid:0x333^0x6000 F:20
check 2 = rootid:0x333^0x6000 F:10 F
])
AT_CHECK([test-stp test-stp-iol-op-3.3])
AT_CLEANUP
AT_SETUP([STP.op.3.3: Root Bridge Selection: Bridge ID Values])
AT_KEYWORDS([STP])
AT_DATA([test-stp-iol-op-3.4],
[# This test file approximates the following test from "Bridge
# Functions Consortium Spanning Tree Protocol Operations Test Suite
# Version 2.3":
# Test STP.op.3.3: Root Bridge Selection: Bridge ID Values
bridge 0 0x333^0x6000 = a
bridge 1 0x222^0x7000 = b
bridge 2 0x111 = a b
run 1000
check 0 = rootid:0x333^0x6000 root
check 1 = rootid:0x333^0x6000 F:20
check 2 = rootid:0x333^0x6000 F:10 F
])
AT_CHECK([test-stp test-stp-iol-op-3.4])
AT_CLEANUP
|