[ovs-dev] [PATCH] rstp.at: Fix intermittent test failure.

2014-09-25 Thread Alex Wang
Sub-test RSTP - dummy interface checks the ovs-vswitchd.log
output immediately after command execution.  The check may
fail if the write of new log is delayed by the IO thread.

This commit fixes the above issue by waiting for the
ovs-vswitchd.log output.

Signed-off-by: Alex Wang al...@nicira.com
---
 tests/rstp.at |2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/rstp.at b/tests/rstp.at
index 3f56931..5caa84f 100644
--- a/tests/rstp.at
+++ b/tests/rstp.at
@@ -213,6 +213,7 @@ AT_CHECK([ovs-ofctl add-flow br1 in_port=2 icmp 
actions=8])
 
 AT_CHECK([ovs-vsctl set port p2 other_config:rstp-enable=true])
 
+OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` -ge 
2])
 AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
 port p1: RSTP state changed from Disabled to Discarding
 port p2: RSTP state changed from Disabled to Discarding
@@ -232,6 +233,7 @@ AT_CHECK([ovs-appctl netdev-dummy/set-admin-state p2 up], 
[], [dnl
 OK
 ])
 
+OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` -ge 
4])
 AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
 port p1: RSTP state changed from Disabled to Discarding
 port p2: RSTP state changed from Disabled to Discarding
-- 
1.7.9.5

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


Re: [ovs-dev] [PATCH] rstp.at: Fix intermittent test failure.

2014-09-25 Thread Gurucharan Shetty
On Thu, Sep 25, 2014 at 8:51 AM, Alex Wang al...@nicira.com wrote:
 Sub-test RSTP - dummy interface checks the ovs-vswitchd.log
 output immediately after command execution.  The check may
 fail if the write of new log is delayed by the IO thread.

 This commit fixes the above issue by waiting for the
 ovs-vswitchd.log output.

 Signed-off-by: Alex Wang al...@nicira.com
 ---
  tests/rstp.at |2 ++
  1 file changed, 2 insertions(+)

 diff --git a/tests/rstp.at b/tests/rstp.at
 index 3f56931..5caa84f 100644
 --- a/tests/rstp.at
 +++ b/tests/rstp.at
 @@ -213,6 +213,7 @@ AT_CHECK([ovs-ofctl add-flow br1 in_port=2 icmp 
 actions=8])

  AT_CHECK([ovs-vsctl set port p2 other_config:rstp-enable=true])

 +OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` 
 -ge 2])

The test failures that I see create 3 entries instead of 2. So the
above test won't fix it.
You can reproduce it, if you put a 'sleep 5' after the below command.
AT_CHECK([ovs-appctl netdev-dummy/set-admin-state p1 up], [], [dnl
 OK
 ])

  AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
  port p1: RSTP state changed from Disabled to Discarding
  port p2: RSTP state changed from Disabled to Discarding
 @@ -232,6 +233,7 @@ AT_CHECK([ovs-appctl netdev-dummy/set-admin-state p2 up], 
 [], [dnl
  OK
  ])

 +OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` 
 -ge 4])
  AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
  port p1: RSTP state changed from Disabled to Discarding
  port p2: RSTP state changed from Disabled to Discarding
 --
 1.7.9.5

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


Re: [ovs-dev] [PATCH] rstp.at: Fix intermittent test failure.

2014-09-25 Thread Gurucharan Shetty
On Thu, Sep 25, 2014 at 8:51 AM, Alex Wang al...@nicira.com wrote:
 Sub-test RSTP - dummy interface checks the ovs-vswitchd.log
 output immediately after command execution.  The check may
 fail if the write of new log is delayed by the IO thread.

 This commit fixes the above issue by waiting for the
 ovs-vswitchd.log output.

 Signed-off-by: Alex Wang al...@nicira.com
This clearly fixes a couple of problems for Linux. So
Acked-by: Gurucharan Shetty gshe...@nicira.com

I still see failures on Windows without a time/warp. I will look into
it and send in a separate patch.

 ---
  tests/rstp.at |2 ++
  1 file changed, 2 insertions(+)

 diff --git a/tests/rstp.at b/tests/rstp.at
 index 3f56931..5caa84f 100644
 --- a/tests/rstp.at
 +++ b/tests/rstp.at
 @@ -213,6 +213,7 @@ AT_CHECK([ovs-ofctl add-flow br1 in_port=2 icmp 
 actions=8])

  AT_CHECK([ovs-vsctl set port p2 other_config:rstp-enable=true])

 +OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` 
 -ge 2])
  AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
  port p1: RSTP state changed from Disabled to Discarding
  port p2: RSTP state changed from Disabled to Discarding
 @@ -232,6 +233,7 @@ AT_CHECK([ovs-appctl netdev-dummy/set-admin-state p2 up], 
 [], [dnl
  OK
  ])

 +OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` 
 -ge 4])
  AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
  port p1: RSTP state changed from Disabled to Discarding
  port p2: RSTP state changed from Disabled to Discarding
 --
 1.7.9.5

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


Re: [ovs-dev] [PATCH] rstp.at: Fix intermittent test failure.

2014-09-25 Thread Alex Wang
Thanks, applied to master,

On Thu, Sep 25, 2014 at 12:39 PM, Gurucharan Shetty shet...@nicira.com
wrote:

 On Thu, Sep 25, 2014 at 8:51 AM, Alex Wang al...@nicira.com wrote:
  Sub-test RSTP - dummy interface checks the ovs-vswitchd.log
  output immediately after command execution.  The check may
  fail if the write of new log is delayed by the IO thread.
 
  This commit fixes the above issue by waiting for the
  ovs-vswitchd.log output.
 
  Signed-off-by: Alex Wang al...@nicira.com
 This clearly fixes a couple of problems for Linux. So
 Acked-by: Gurucharan Shetty gshe...@nicira.com

 I still see failures on Windows without a time/warp. I will look into
 it and send in a separate patch.

  ---
   tests/rstp.at |2 ++
   1 file changed, 2 insertions(+)
 
  diff --git a/tests/rstp.at b/tests/rstp.at
  index 3f56931..5caa84f 100644
  --- a/tests/rstp.at
  +++ b/tests/rstp.at
  @@ -213,6 +213,7 @@ AT_CHECK([ovs-ofctl add-flow br1 in_port=2 icmp
 actions=8])
 
   AT_CHECK([ovs-vsctl set port p2 other_config:rstp-enable=true])
 
  +OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc
 -l` -ge 2])
   AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
   port p1: RSTP state changed from Disabled to Discarding
   port p2: RSTP state changed from Disabled to Discarding
  @@ -232,6 +233,7 @@ AT_CHECK([ovs-appctl netdev-dummy/set-admin-state p2
 up], [], [dnl
   OK
   ])
 
  +OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc
 -l` -ge 4])
   AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
   port p1: RSTP state changed from Disabled to Discarding
   port p2: RSTP state changed from Disabled to Discarding
  --
  1.7.9.5
 
  ___
  dev mailing list
  dev@openvswitch.org
  http://openvswitch.org/mailman/listinfo/dev

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