This commit makes the LACP unit tests more general by adding
ovs-appctl bond/show output.

Signed-off-by: Ethan Jackson <et...@nicira.com>
---
 tests/automake.mk          |    2 +-
 tests/{lacp.at => bond.at} |   26 +++++++++++++++++++++-----
 tests/testsuite.at         |    2 +-
 3 files changed, 23 insertions(+), 7 deletions(-)
 rename tests/{lacp.at => bond.at} (84%)

diff --git a/tests/automake.mk b/tests/automake.mk
index 9ae4c5c..76ec5b3 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -18,7 +18,7 @@ TESTSUITE_AT = \
        tests/odp.at \
        tests/multipath.at \
        tests/autopath.at \
-       tests/lacp.at \
+       tests/bond.at \
        tests/learn.at \
        tests/vconn.at \
        tests/file_name.at \
diff --git a/tests/lacp.at b/tests/bond.at
similarity index 84%
rename from tests/lacp.at
rename to tests/bond.at
index de7a3a7..7df11c3 100644
--- a/tests/lacp.at
+++ b/tests/bond.at
@@ -1,13 +1,12 @@
-AT_BANNER([lacp])
+AT_BANNER([bond])
 
-AT_SETUP([lacp - config])
+AT_SETUP([bond - single port])
 OVS_VSWITCHD_START([\
         add-port br0 p1 --\
         set Port p1 lacp=active --\
         set Interface p1 type=dummy ])
 
-AT_CHECK([ovs-appctl lacp/show], [0], [stdout])
-AT_CHECK([cat stdout], [0], [dnl
+AT_CHECK([ovs-appctl lacp/show], [0], [dnl
 ---- p1 ----
        status: active negotiated
        sys_id: aa:55:aa:55:00:00
@@ -33,13 +32,15 @@ slave: p1: expired attached
        partner key: 0
        partner state: timeout
 ])
+AT_CHECK([ovs-appctl bond/show], [0], [])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
 
-AT_SETUP([lacp - config])
+AT_SETUP([bond - multi port])
 OVS_VSWITCHD_START([dnl
         add-bond br0 bond p1 p2 --\
         set Port bond lacp=active \
+            bond_mode=active-backup \
             other_config:lacp-time="fast" \
             other_config:lacp-system-id=11:22:33:44:55:66 \
             other_config:lacp-system-priority=54321 --\
@@ -97,5 +98,20 @@ slave: p2: expired attached
        partner key: 0
        partner state: timeout
 ])
+AT_CHECK([ovs-appctl bond/show], [0], [dnl
+---- bond ----
+bond_mode: active-backup
+bond-hash-basis: 0
+updelay: 0 ms
+downdelay: 0 ms
+lacp_negotiated: true
+
+slave p1: disabled
+       may_enable: false
+
+slave p2: disabled
+       may_enable: false
+
+])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
diff --git a/tests/testsuite.at b/tests/testsuite.at
index d8af592..8c3289e 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -38,7 +38,7 @@ m4_define([OVS_WAIT_WHILE], [OVS_WAIT([if $1; then :; else 
exit 0; fi], [$2])])
 m4_include([tests/ovsdb-macros.at])
 m4_include([tests/ofproto-macros.at])
 
-m4_include([tests/lacp.at])
+m4_include([tests/bond.at])
 m4_include([tests/library.at])
 m4_include([tests/bundle.at])
 m4_include([tests/classifier.at])
-- 
1.7.7.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to