Here's an incremental.
---
tests/ofproto-dpif.at | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index db2dccd..13c6fd7 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -64,7 +64,10 @@ AT_CLEANUP
AT_SETUP([ofproto-dpif - output/flood flags])
dnl This test assumes that OpenFlow port numbers are allocated in order
-dnl starting from one.
+dnl starting from one. It does not necessarily require that they are allocated
+dnl in the same order that they are named in the database. Just that the
+dnl following command guarantees OpenFlow port 65534, and ports 1-7 exist in
+dnl the bridge.
OVS_VSWITCHD_START([dnl
add-port br0 p1 -- set Interface p1 type=dummy --\
add-port br0 p2 -- set Interface p2 type=dummy --\
@@ -86,16 +89,23 @@ AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
AT_CHECK([ovs-appctl ofproto/trace br0
'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'],
[0], [stdout])
AT_CHECK([tail -1 stdout \
-| sed -e 's/Datapath actions: //' \
-| python -c "import sys; print
','.join(sorted(sys.stdin.read().strip().split(',')))"], [0],
- [0,2,3,4,7
+| sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
+0
+2
+3
+4
+7
])
AT_CHECK([ovs-appctl ofproto/trace br0
'in_port(2),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'],
[0], [stdout])
AT_CHECK([tail -1 stdout \
-| sed -e 's/Datapath actions: //' \
-| python -c "import sys; print
','.join(sorted(sys.stdin.read().strip().split(',')))"], [0],
- [0,1,3,4,6,7
+| sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
+0
+1
+3
+4
+6
+7
])
AT_CHECK([ovs-appctl ofproto/trace br0
'in_port(3),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'],
[0], [stdout])
--
1.7.7.1
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev