]> git.proxmox.com Git - mirror_ovs.git/blame - tests/bridge.at
test: Reverse the order of commands added by ON_EXIT macro
[mirror_ovs.git] / tests / bridge.at
CommitLineData
c40b890f
BP
1AT_BANNER([bridge])
2
3dnl When a port disappears from a datapath, e.g. because an admin used
4dnl "ovs-dpctl del-port", the bridge code should be resilient enough to
5dnl notice and add it back the next time we reconfigure. A prior version
6dnl of the code failed to do this, so this test guards against regression.
7AT_SETUP([bridge - ports that disappear get added back])
8OVS_VSWITCHD_START
9
10# Add some ports and make sure that they show up in the datapath.
11ADD_OF_PORTS([br0], 1, 2)
12AT_CHECK([ovs-appctl dpif/show], [0], [dnl
13dummy@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.
22AT_CHECK([ovs-appctl dpif-dummy/delete-port ovs-dummy p1])
23AT_CHECK([ovs-appctl dpif/show], [0], [dnl
24dummy@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.
31AT_CHECK([ovs-vsctl del-port p2])
32AT_CHECK([ovs-appctl dpif/show], [0], [dnl
33dummy@ovs-dummy: hit:0 missed:0
34 br0:
35 br0 65534/100: (dummy)
36 p1 1/1: (dummy)
37])
38AT_CLEANUP