diff mbox

[ovs-dev,v2] system-ovn.at: Fix occasional test failures.

Message ID 1471581896-10755-1-git-send-email-guru@ovn.org
State Accepted
Headers show

Commit Message

Gurucharan Shetty Aug. 19, 2016, 4:44 a.m. UTC
A run of the NAT unit tests hundred times showed some
occasional unit test failures. With this commit, I haven't
seen any failures for 100 runs.

Reported-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
---
 tests/system-ovn.at | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Gurucharan Shetty Aug. 19, 2016, 2:47 p.m. UTC | #1
On 18 August 2016 at 21:44, Gurucharan Shetty <guru@ovn.org> wrote:

> A run of the NAT unit tests hundred times showed some
> occasional unit test failures. With this commit, I haven't
> seen any failures for 100 runs.
>
> Reported-by: Joe Stringer <joe@ovn.org>
> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
>

Joe acked it offline, so I will apply it in sometime.


> ---
>  tests/system-ovn.at | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/system-ovn.at b/tests/system-ovn.at
> index 09a5b6b..e267384 100755
> --- a/tests/system-ovn.at
> +++ b/tests/system-ovn.at
> @@ -166,7 +166,8 @@ as northd
>  OVS_APP_EXIT_AND_WAIT([ovn-northd])
>
>  as
> -OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d"])
> +OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
> +/connection dropped.*/d"])
>  AT_CLEANUP
>
>  AT_SETUP([ovn -- 2 LRs connected via LS, gateway router, easy SNAT])
> @@ -247,6 +248,8 @@ ovn-nbctl lsp-add alice alice1 \
>  ovn-nbctl -- --id=@nat create nat type="snat" logical_ip=192.168.1.2 \
>      external_ip=172.16.1.1 -- add logical_router R2 nat @nat
>
> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-int | grep ct\( | grep nat])
> +
>  # South-North SNAT: 'foo1' pings 'alice1'. But 'alice1' receives traffic
>  # from 172.16.1.1
>  NS_CHECK_EXEC([foo1], [ping -q -c 3 -i 0.3 -w 2 172.16.1.2 |
> FORMAT_PING], \
> @@ -272,7 +275,8 @@ as northd
>  OVS_APP_EXIT_AND_WAIT([ovn-northd])
>
>  as
> -OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d"])
> +OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
> +/connection dropped.*/d"])
>  AT_CLEANUP
>
>  AT_SETUP([ovn -- load-balancing])
> --
> 1.9.1
>
>
diff mbox

Patch

diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 09a5b6b..e267384 100755
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -166,7 +166,8 @@  as northd
 OVS_APP_EXIT_AND_WAIT([ovn-northd])
 
 as
-OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d"])
+OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
+/connection dropped.*/d"])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 2 LRs connected via LS, gateway router, easy SNAT])
@@ -247,6 +248,8 @@  ovn-nbctl lsp-add alice alice1 \
 ovn-nbctl -- --id=@nat create nat type="snat" logical_ip=192.168.1.2 \
     external_ip=172.16.1.1 -- add logical_router R2 nat @nat
 
+OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-int | grep ct\( | grep nat])
+
 # South-North SNAT: 'foo1' pings 'alice1'. But 'alice1' receives traffic
 # from 172.16.1.1
 NS_CHECK_EXEC([foo1], [ping -q -c 3 -i 0.3 -w 2 172.16.1.2 | FORMAT_PING], \
@@ -272,7 +275,8 @@  as northd
 OVS_APP_EXIT_AND_WAIT([ovn-northd])
 
 as
-OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d"])
+OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
+/connection dropped.*/d"])
 AT_CLEANUP
 
 AT_SETUP([ovn -- load-balancing])