]>
Commit | Line | Data |
---|---|---|
c40b890f BP |
1 | AT_BANNER([bridge]) |
2 | ||
3 | dnl When a port disappears from a datapath, e.g. because an admin used | |
4 | dnl "ovs-dpctl del-port", the bridge code should be resilient enough to | |
5 | dnl notice and add it back the next time we reconfigure. A prior version | |
6 | dnl of the code failed to do this, so this test guards against regression. | |
7 | AT_SETUP([bridge - ports that disappear get added back]) | |
8 | OVS_VSWITCHD_START | |
9 | ||
10 | # Add some ports and make sure that they show up in the datapath. | |
11 | ADD_OF_PORTS([br0], 1, 2) | |
12 | AT_CHECK([ovs-appctl dpif/show], [0], [dnl | |
13 | dummy@ovs-dummy: hit:0 missed:0 | |
14 | br0: | |
15 | br0 65534/100: (dummy) | |
16 | p1 1/1: (dummy) | |
17 | p2 2/2: (dummy) | |
18 | ]) | |
19 | ||
20 | # Delete p1 from the datapath as if by "ovs-dpctl del-port" | |
21 | # and check that it disappeared. | |
22 | AT_CHECK([ovs-appctl dpif-dummy/delete-port ovs-dummy p1]) | |
23 | AT_CHECK([ovs-appctl dpif/show], [0], [dnl | |
24 | dummy@ovs-dummy: hit:0 missed:0 | |
25 | br0: | |
26 | br0 65534/100: (dummy) | |
27 | p2 2/2: (dummy) | |
28 | ]) | |
29 | ||
30 | # Force reconfiguration and make sure that p1 got added back. | |
31 | AT_CHECK([ovs-vsctl del-port p2]) | |
32 | AT_CHECK([ovs-appctl dpif/show], [0], [dnl | |
33 | dummy@ovs-dummy: hit:0 missed:0 | |
34 | br0: | |
35 | br0 65534/100: (dummy) | |
36 | p1 1/1: (dummy) | |
37 | ]) | |
38 | AT_CLEANUP |