diff mbox series

[ovs-dev,v2,3/6] tests: Improve checking in "test unixctl" test.

Message ID 20201105051036.3271437-4-blp@ovn.org
State Superseded
Headers show
Series Add DDlog implementation of ovn-northd | expand

Commit Message

Ben Pfaff Nov. 5, 2020, 5:10 a.m. UTC
It seems worthwhile to ensure that this call does in fact time out.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 tests/ovn-northd.at | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Numan Siddique Nov. 5, 2020, 11:08 a.m. UTC | #1
On Thu, Nov 5, 2020 at 10:41 AM Ben Pfaff <blp@ovn.org> wrote:
>
> It seems worthwhile to ensure that this call does in fact time out.
>
> Signed-off-by: Ben Pfaff <blp@ovn.org>

Acked-by: Numan Siddique <numans@ovn.org>

Numan

> ---
>  tests/ovn-northd.at | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
> index 0bf20c1a7053..26376c367178 100644
> --- a/tests/ovn-northd.at
> +++ b/tests/ovn-northd.at
> @@ -258,8 +258,11 @@ AT_CHECK([ovn-nbctl --wait=sb lsp-del p1])
>  OVS_APP_EXIT_AND_WAIT_BY_TARGET(["$ovs_base"/northd/ovn-northd.ctl], ["$ovs_base"/northd/ovn-northd.pid])
>
>  # Check no port_binding entry for new port as ovn-northd is not running
> +#
> +# 142 is 128+14, the exit status that the shell reports when a
> +# process exits due to SIGARLM (signal 14).
>  ovn-nbctl lsp-add sw p2
> -ovn-nbctl --timeout=10 --wait=sb sync
> +AT_CHECK([ovn-nbctl --timeout=10 --wait=sb sync], [142], [], [ignore])
>  check_row_count Port_Binding 0 logical_port=p2
>
>  # test default unixctl path
> --
> 2.26.2
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ben Pfaff Nov. 5, 2020, 5:03 p.m. UTC | #2
On Thu, Nov 05, 2020 at 04:38:49PM +0530, Numan Siddique wrote:
> On Thu, Nov 5, 2020 at 10:41 AM Ben Pfaff <blp@ovn.org> wrote:
> >
> > It seems worthwhile to ensure that this call does in fact time out.
> >
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> 
> Acked-by: Numan Siddique <numans@ovn.org>

Thanks, applied to OVN master.
Ben Pfaff Nov. 5, 2020, 5:06 p.m. UTC | #3
On Thu, Nov 05, 2020 at 09:03:25AM -0800, Ben Pfaff wrote:
> On Thu, Nov 05, 2020 at 04:38:49PM +0530, Numan Siddique wrote:
> > On Thu, Nov 5, 2020 at 10:41 AM Ben Pfaff <blp@ovn.org> wrote:
> > >
> > > It seems worthwhile to ensure that this call does in fact time out.
> > >
> > > Signed-off-by: Ben Pfaff <blp@ovn.org>
> > 
> > Acked-by: Numan Siddique <numans@ovn.org>
> 
> Thanks, applied to OVN master.

Also patch 2.
diff mbox series

Patch

diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 0bf20c1a7053..26376c367178 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -258,8 +258,11 @@  AT_CHECK([ovn-nbctl --wait=sb lsp-del p1])
 OVS_APP_EXIT_AND_WAIT_BY_TARGET(["$ovs_base"/northd/ovn-northd.ctl], ["$ovs_base"/northd/ovn-northd.pid])
 
 # Check no port_binding entry for new port as ovn-northd is not running
+#
+# 142 is 128+14, the exit status that the shell reports when a
+# process exits due to SIGARLM (signal 14).
 ovn-nbctl lsp-add sw p2
-ovn-nbctl --timeout=10 --wait=sb sync
+AT_CHECK([ovn-nbctl --timeout=10 --wait=sb sync], [142], [], [ignore])
 check_row_count Port_Binding 0 logical_port=p2
 
 # test default unixctl path