Re: [ovs-dev] [PATCH] tests: Expand 'bundle with many ports' test.

2016-03-07 Thread Joe Stringer
On 7 March 2016 at 15:39, Ben Pfaff  wrote:
> On Mon, Mar 07, 2016 at 03:36:38PM -0800, Joe Stringer wrote:
>> Explain what this test is doing, and check that the decoded action can
>> be re-encoded and dumped back out of OVS.
>>
>> Suggested-by: Ben Pfaff 
>> Signed-off-by: Joe Stringer 
>
> Acked-by: Ben Pfaff 

Thanks, applied.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] tests: Expand 'bundle with many ports' test.

2016-03-07 Thread Ben Pfaff
On Mon, Mar 07, 2016 at 03:36:38PM -0800, Joe Stringer wrote:
> Explain what this test is doing, and check that the decoded action can
> be re-encoded and dumped back out of OVS.
> 
> Suggested-by: Ben Pfaff 
> Signed-off-by: Joe Stringer 

Acked-by: Ben Pfaff 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH] tests: Expand 'bundle with many ports' test.

2016-03-07 Thread Joe Stringer
Explain what this test is doing, and check that the decoded action can
be re-encoded and dumped back out of OVS.

Suggested-by: Ben Pfaff 
Signed-off-by: Joe Stringer 
---
 tests/bundle.at | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/tests/bundle.at b/tests/bundle.at
index 298e683b0a1a..0bc179f978c8 100644
--- a/tests/bundle.at
+++ b/tests/bundle.at
@@ -193,8 +193,18 @@ AT_CHECK([ovs-ofctl parse-flow 
'actions=bundle(symmetric_l4,60,hrw,ofport,robot:
 ])
 AT_CLEANUP
 
+dnl Bundle actions with <= 2 ports typically align nicely within ofpbuf memory
+dnl allocation, so will not trigger reallocation codepaths. This test was
+dnl introduced to ensure that when bundle actions with a larger number of ports
+dnl are used, the encode/decode still works correctly. By placing the bundle
+dnl action deep within a list of actions, this test was able to trigger
+dnl Valgrind warnings for use-after-free bugs.
 AT_SETUP([bundle action with many ports])
 OVS_VSWITCHD_START
 AT_CHECK([ovs-ofctl add-flow br0 
'actions=set_field:0x1->metadata,set_field:0x2->metadata,set_field:0x3->metadata,set_field:0x4->metadata,bundle(symmetric_l4,0,hrw,ofport,slaves:[[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]])'])
+AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
+ 
actions=load:0x1->OXM_OF_METADATA[[]],load:0x2->OXM_OF_METADATA[[]],load:0x3->OXM_OF_METADATA[[]],load:0x4->OXM_OF_METADATA[[]],bundle(symmetric_l4,0,hrw,ofport,slaves:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)
+NXST_FLOW reply:
+])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
-- 
2.1.4

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