[ovs-dev] [lacp_bugs 7/7] tests: Perform basic LACP unit tests.

Ethan Jackson ethan at nicira.com
Wed Nov 30 22:42:27 UTC 2011


Alright, I've changed it.  Here's another incremental.

---
 tests/lacp.at |  110 ++++++++++++++++++++++++++++-----------------------------
 1 files changed, 54 insertions(+), 56 deletions(-)

diff --git a/tests/lacp.at b/tests/lacp.at
index eff0c07..de7a3a7 100644
--- a/tests/lacp.at
+++ b/tests/lacp.at
@@ -7,31 +7,31 @@ OVS_VSWITCHD_START([\
         set Interface p1 type=dummy ])
 
 AT_CHECK([ovs-appctl lacp/show], [0], [stdout])
-AT_CHECK([sed -e 's/\t/    /' < stdout], [0], [dnl
+AT_CHECK([cat stdout], [0], [dnl
 ---- p1 ----
-    status: active negotiated
-    sys_id: aa:55:aa:55:00:00
-    sys_priority: 65535
-    aggregation key: 1
-    lacp_time: slow
+	status: active negotiated
+	sys_id: aa:55:aa:55:00:00
+	sys_priority: 65535
+	aggregation key: 1
+	lacp_time: slow
 
 slave: p1: expired attached
-    port_id: 1
-    port_priority: 65535
+	port_id: 1
+	port_priority: 65535
 
-    actor sys_id: aa:55:aa:55:00:00
-    actor sys_priority: 65535
-    actor port_id: 1
-    actor port_priority: 65535
-    actor key: 1
-    actor state: activity synchronized collecting distributing expired
+	actor sys_id: aa:55:aa:55:00:00
+	actor sys_priority: 65535
+	actor port_id: 1
+	actor port_priority: 65535
+	actor key: 1
+	actor state: activity synchronized collecting distributing expired
 
-    partner sys_id: 00:00:00:00:00:00
-    partner sys_priority: 0
-    partner port_id: 0
-    partner port_priority: 0
-    partner key: 0
-    partner state: timeout
+	partner sys_id: 00:00:00:00:00:00
+	partner sys_priority: 0
+	partner port_id: 0
+	partner port_priority: 0
+	partner key: 0
+	partner state: timeout
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -53,51 +53,49 @@ OVS_VSWITCHD_START([dnl
             other_config:lacp-aggregation-key=3333 ])
 
 AT_CHECK([ovs-appctl lacp/show], [0], [stdout])
-AT_CHECK([sed \
--e 's/aggregation key:.*/aggregation key: <omitted>/' \
--e 's/\t/    /' < stdout], [0], [dnl
+AT_CHECK([sed -e 's/aggregation key:.*/aggregation key: <omitted>/' < stdout], [0], [dnl
 ---- bond ----
-    status: active negotiated
-    sys_id: 11:22:33:44:55:66
-    sys_priority: 54321
-    aggregation key: <omitted>
-    lacp_time: fast
+	status: active negotiated
+	sys_id: 11:22:33:44:55:66
+	sys_priority: 54321
+	aggregation key: <omitted>
+	lacp_time: fast
 
 slave: p1: expired attached
-    port_id: 11
-    port_priority: 111
+	port_id: 11
+	port_priority: 111
 
-    actor sys_id: 11:22:33:44:55:66
-    actor sys_priority: 54321
-    actor port_id: 11
-    actor port_priority: 111
-    actor key: 3333
-    actor state: activity timeout aggregation synchronized collecting distributing expired
+	actor sys_id: 11:22:33:44:55:66
+	actor sys_priority: 54321
+	actor port_id: 11
+	actor port_priority: 111
+	actor key: 3333
+	actor state: activity timeout aggregation synchronized collecting distributing expired
 
-    partner sys_id: 00:00:00:00:00:00
-    partner sys_priority: 0
-    partner port_id: 0
-    partner port_priority: 0
-    partner key: 0
-    partner state: timeout
+	partner sys_id: 00:00:00:00:00:00
+	partner sys_priority: 0
+	partner port_id: 0
+	partner port_priority: 0
+	partner key: 0
+	partner state: timeout
 
 slave: p2: expired attached
-    port_id: 22
-    port_priority: 222
+	port_id: 22
+	port_priority: 222
 
-    actor sys_id: 11:22:33:44:55:66
-    actor sys_priority: 54321
-    actor port_id: 22
-    actor port_priority: 222
-    actor key: 3333
-    actor state: activity timeout aggregation synchronized collecting distributing expired
+	actor sys_id: 11:22:33:44:55:66
+	actor sys_priority: 54321
+	actor port_id: 22
+	actor port_priority: 222
+	actor key: 3333
+	actor state: activity timeout aggregation synchronized collecting distributing expired
 
-    partner sys_id: 00:00:00:00:00:00
-    partner sys_priority: 0
-    partner port_id: 0
-    partner port_priority: 0
-    partner key: 0
-    partner state: timeout
+	partner sys_id: 00:00:00:00:00:00
+	partner sys_priority: 0
+	partner port_id: 0
+	partner port_priority: 0
+	partner key: 0
+	partner state: timeout
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
-- 
1.7.7.1




More information about the dev mailing list