This test will exercise the code path in ovs-vsctl where a del-port is attempted using the parent of a fake-bridge. It expects a message saying that user provided the wrong bridge. Not a segfault.
Signed-off-by: Flavio Fernandes <fla...@flaviof.com> --- tests/ovs-vsctl.at | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at index 3189a9b..f9e7f3b 100644 --- a/tests/ovs-vsctl.at +++ b/tests/ovs-vsctl.at @@ -605,6 +605,23 @@ CHECK_PORTS([xapi1], [eth0.$1]) CHECK_IFACES([xapi1], [eth0.$1]) OVS_VSCTL_CLEANUP AT_CLEANUP + +AT_SETUP([simple fake bridge + del-port from parent (VLAN $1)]) +AT_KEYWORDS([ovs-vsctl fake-bridge del-port]) +OVS_VSCTL_SETUP +OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF([$1]) +AT_CHECK([RUN_OVS_VSCTL([del-port xenbr0 eth0.$1])], [1], [], + [ovs-vsctl: bridge xenbr0 does not have a port eth0.$1 (although its child bridge xapi1 does) +]) +CHECK_PORTS([xenbr0], [eth0]) +CHECK_IFACES([xenbr0], [eth0]) +CHECK_PORTS([xapi1], [eth0.$1]) +CHECK_IFACES([xapi1], [eth0.$1]) +AT_CHECK([RUN_OVS_VSCTL([del-port xapi1 eth0.$1])]) +CHECK_PORTS([xenbr0], [eth0]) +CHECK_IFACES([xenbr0], [eth0]) +OVS_VSCTL_CLEANUP +AT_CLEANUP ]) # OVS_VSCTL_FAKE_BRIDGE_TESTS OVS_VSCTL_FAKE_BRIDGE_TESTS([9]) -- 1.9.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev