ovs-vsctl: Allow modifying "immutable" columns if we just created the row.
[cascardo/ovs.git] / tests / ovs-vsctl.at
index 440bf1a..2f83566 100644 (file)
@@ -159,8 +159,14 @@ AT_CHECK(
   [0], [], [stderr])
 AT_CHECK([grep -c 'terminating with signal' stderr], [0], [1
 ])
-AT_CHECK([kill -l `cat status`], [0], [ALRM
+if test "$IS_WIN32" = "yes"; then
+  AT_CHECK([cat status], [0], [3
 ])
+else
+  # 128 + SIGALRM
+  AT_CHECK([cat status], [0], [142
+])
+fi
 
 dnl Without --retry, we should retry for passive connections.
 AT_CHECK(
@@ -169,8 +175,14 @@ AT_CHECK(
   [0], [], [stderr])
 AT_CHECK([grep -c 'terminating with signal' stderr], [0], [1
 ])
-AT_CHECK([kill -l `cat status`], [0], [ALRM
+if test "$IS_WIN32" = "yes"; then
+  AT_CHECK([cat status], [0], [3
+])
+else
+  # 128 + SIGALRM
+  AT_CHECK([cat status], [0], [142
 ])
+fi
 AT_CLEANUP
 
 dnl ----------------------------------------------------------------------
@@ -620,7 +632,8 @@ AT_SETUP([database commands -- positive checks])
 AT_KEYWORDS([ovs-vsctl])
 OVS_VSCTL_SETUP
 AT_CHECK(
-  [RUN_OVS_VSCTL_TOGETHER([--id=@br0 create bridge name=br0],
+  [RUN_OVS_VSCTL_TOGETHER([--id=@br0 create bridge name=br123],
+                          [set b br123 name=br0],
                           [set o . bridges=@br0])],
   [0], [stdout], [], [OVS_VSCTL_CLEANUP])
 cp stdout out1
@@ -630,6 +643,7 @@ cp stdout out2
 AT_CHECK([${PERL} $srcdir/uuidfilt.pl out1 out2], [0],
   [[<0>
 
+
 _uuid               : <0>
 controller          : []
 datapath_id         : []
@@ -639,12 +653,15 @@ fail_mode           : []
 flood_vlans         : []
 flow_tables         : {}
 ipfix               : []
+mcast_snooping_enable: false
 mirrors             : []
 name                : "br0"
 netflow             : []
 other_config        : {}
 ports               : []
 protocols           : []
+rstp_enable         : false
+rstp_status         : {}
 sflow               : []
 status              : {}
 stp_enable          : false
@@ -832,12 +849,15 @@ AT_CHECK([RUN_OVS_VSCTL([destroy bridge br2])],
 AT_CHECK([RUN_OVS_VSCTL([add in br1 name x])],
   [1], [], [ovs-vsctl: cannot modify read-only column name in table Interface
 ], [OVS_VSCTL_CLEANUP])
-AT_CHECK([RUN_OVS_VSCTL([set port br1 name br2])],
+AT_CHECK([RUN_OVS_VSCTL([set port br0 name=br2])],
   [1], [], [ovs-vsctl: cannot modify read-only column name in table Port
 ], [OVS_VSCTL_CLEANUP])
-AT_CHECK([RUN_OVS_VSCTL([remove bridge br1 name br1])],
+AT_CHECK([RUN_OVS_VSCTL([remove bridge br0 name br1])],
   [1], [], [ovs-vsctl: cannot modify read-only column name in table Bridge
 ], [OVS_VSCTL_CLEANUP])
+AT_CHECK([RUN_OVS_VSCTL([remove bridge br1 flood-vlans true])],
+  [1], [], [ovs-vsctl: "true" is not a valid integer
+], [OVS_VSCTL_CLEANUP])
 AT_CHECK([RUN_OVS_VSCTL([clear bridge br1 name])],
   [1], [], [ovs-vsctl: cannot modify read-only column name in table Bridge
 ], [OVS_VSCTL_CLEANUP])
@@ -1131,12 +1151,15 @@ fail_mode           : []
 flood_vlans         : []
 flow_tables         : {}
 ipfix               : []
+mcast_snooping_enable: false
 mirrors             : []
 name                : "br0"
 netflow             : []
 other_config        : {}
 ports               : []
 protocols           : []
+rstp_enable         : false
+rstp_status         : {}
 sflow               : []
 status              : {}
 stp_enable          : false
@@ -1169,8 +1192,9 @@ AT_CHECK([RUN_OVS_VSCTL(
 type                : linux-htb
 ], [], [OVS_VSCTL_CLEANUP])
 AT_CHECK([RUN_OVS_VSCTL(
-   [--columns=other_config list Queue | sort | xargs echo])], [0],
-[other_config : {max-rate=100000000, min-rate=100000000} other_config : {min-rate=500000000}
+   [--columns=other_config list Queue | sort | sed '/^$/d'])], [0],
+[other_config        : {max-rate="100000000", min-rate="100000000"}
+other_config        : {min-rate="500000000"}
 ], [], [OVS_VSCTL_CLEANUP])
 AT_CHECK([RUN_OVS_VSCTL(
    [clear Port a1 qos],
@@ -1203,10 +1227,11 @@ m4_foreach(
 [reserved_name],
 [[ovs-netdev],
 [ovs-dummy],
-[gre_system],
-[gre64_system],
-[lisp_system],
-[vxlan_system]],
+[genev_sys],
+[gre_sys],
+[gre64_sys],
+[lisp_sys],
+[vxlan_sys]],
 [
 # Try creating the port
 AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [dnl
@@ -1233,15 +1258,18 @@ OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
                     -- add-port br0 p3 -- set Interface p3 type=lisp \
                     options:remote_ip=2.2.2.2 ofport_request=3 \
                     -- add-port br0 p4 -- set Interface p4 type=vxlan \
-                    options:remote_ip=2.2.2.2 ofport_request=4])
+                    options:remote_ip=2.2.2.2 ofport_request=4 \
+                    -- add-port br0 p5 -- set Interface p5 type=geneve \
+                    options:remote_ip=2.2.2.2 ofport_request=5])
 
 # Test creating all reserved tunnel port names
 m4_foreach(
 [reserved_name],
-[[gre_system],
-[gre64_system],
-[lisp_system],
-[vxlan_system]],
+[[genev_sys],
+[gre_sys],
+[gre64_sys],
+[lisp_sys],
+[vxlan_sys]],
 [
 # Try creating the port
 AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [dnl