ofp-actions: Fix use-after-free in bundle action.
[cascardo/ovs.git] / tests / interface-reconfigure.at
index 3658882..22a3e2e 100644 (file)
@@ -696,6 +696,8 @@ AT_BANNER([interface-reconfigure])
 
 AT_SETUP([non-VLAN, non-bond])
 AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
 ifr_setup
 
 AT_CHECK([ifr_run --force xenbr2 up], [0], [], [stderr])
@@ -709,7 +711,7 @@ configure_datapath: bridge      - xenbr2
 configure_datapath: physical    - [u'eth2']
 configure_datapath: extra ports - []
 configure_datapath: extra bonds - []
-/usr/bin/ovs-vsctl --timeout=5 -vANY:console:off get-fail-mode xenbr2
+/usr/bin/ovs-vsctl -vconsole:off get-fail-mode xenbr2
 Applying changes to /etc/sysconfig/network-scripts/route-xenbr2 configuration
 Applying changes to /etc/sysconfig/network configuration
 Applying changes to /etc/sysconfig/network-scripts/ifcfg-xenbr2 configuration
@@ -724,7 +726,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xenbr2 configuration
     set Bridge xenbr2 fail_mode=secure
     remove Bridge xenbr2 other_config disable-in-band
     br-set-external-id xenbr2 xs-network-uuids d08c8749-0c8f-9e8d-ce25-fd364661ee99
-/usr/bin/ovs-vsctl --timeout=5 -vANY:console:off get interface eth2 ofport
+/usr/bin/ovs-vsctl -vconsole:off get interface eth2 ofport
 /usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=5,arp,nw_proto=1,actions=local
 /usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=local,arp,dl_src=00:15:17:a0:29:80,actions=5
 /usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=5,dl_dst=00:15:17:a0:29:80,actions=local
@@ -771,6 +773,8 @@ AT_CLEANUP
 \f
 AT_SETUP([VLAN, non-bond])
 AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
 ifr_setup
 
 AT_CHECK([ifr_run --force xapi3 up], [0], [], [stderr])
@@ -844,6 +848,8 @@ AT_CLEANUP
 \f
 AT_SETUP([Bond, non-VLAN])
 AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
 ifr_setup
 
 # Pretend that bond0 exists, even though it would really be created by
@@ -932,6 +938,8 @@ AT_CLEANUP
 \f
 AT_SETUP([VLAN on bond])
 AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
 ifr_setup
 
 # Pretend that bond0 exists, even though it would really be created by
@@ -1024,3 +1032,20 @@ action_down: bring down physical devices - [u'eth0', u'eth1']
 ]])
 
 AT_CLEANUP
+
+dnl This test configures two tunnels, then deletes the second and re-uses its
+dnl name for different types of ports. This was introduced to detect errors
+dnl where port configuration persists even when the port is deleted and
+dnl readded.
+AT_SETUP([Re-create port with different types])
+AT_KEYWORDS([interface-reconfigure])
+OVS_VSWITCHD_START(
+  [add-port br0 p0 -- set int p0 type=gre options:remote_ip=127.0.0.1 -- \
+   add-port br0 p1 -- set int p1 type=dummy -- \
+   add-port br0 p2 -- set int p2 type=dummy])
+
+AT_CHECK([ovs-vsctl set int p1 type=gre options:remote_ip=127.0.0.1])
+AT_CHECK([ovs-vsctl del-port p1])
+AT_CHECK([ovs-vsctl add-port br0 p1 -- set int p1 type=dummy])
+
+AT_CLEANUP