On Thu, Nov 05, 2020 at 05:31:03PM +0530, Numan Siddique wrote:
> On Thu, Nov 5, 2020 at 10:42 AM Ben Pfaff <b...@ovn.org> wrote:
> >
> > From: Leonid Ryzhyk <lryz...@vmware.com>
> >
> > This implementation is incremental, meaning that it only recalculates
> > what is needed for the southbound database when northbound changes
> > occur.  It is expected to scale better than the C implementation,
> > for large deployments.  (This may take testing and tuning to be
> > effective.)
> >
> > There are three tests that I'm having mysterious trouble getting
> > to work with DDlog.  For now, I've marked the testsuite to skip
> > them unless RUN_ANYWAY=yes is set in the environment.
> >
> > Signed-off-by: Leonid Ryzhyk <lryz...@vmware.com>
> > Co-authored-by: Justin Pettit <jpet...@ovn.org>
> > Signed-off-by: Justin Pettit <jpet...@ovn.org>
> > Co-authored-by: Ben Pfaff <b...@ovn.org>
> > Signed-off-by: Ben Pfaff <b...@ovn.org>
> 
> Thanks Ben, Leonid and Justin for this huge effort.
> 
> Please note that  I haven't reviewed this patch yet.  I just tried out
> this ptach.
> After applying this patch, if I run the tests without
> configuring/building ddlog, all the tests run twice and
> ovn-northd-ddlog tests fail.
> 
> Eg.
>  70: ovn -- send gratuitous arp on localnet -- ovn-northd ok
>  71: ovn -- send gratuitous arp on localnet -- ovn-northd-ddlog FAILED
> (ovs-macros.at:228)
> 
> I think it's better to skip those tests if ddlog is not configured.

Sorry, that's how it was supposed to work, but I forgot to test it.

Here's an incremental patch that fixes it.  I'll fold this into v3 when
I post it later.

diff --git a/acinclude.m4 b/acinclude.m4
index 7b351b2aa418..83d1d13bfb86 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -49,10 +49,10 @@ AC_DEFUN([OVS_CHECK_DDLOG], [
   AC_ARG_WITH([ddlog],
               [AC_HELP_STRING([--with-ddlog=.../differential-datalog/lib],
                               [Enables DDlog by pointing to its library dir])],
-              [DDLOGLIBDIR=$withval], [DDLOGLIBDIR=none])
+              [DDLOGLIBDIR=$withval], [DDLOGLIBDIR=no])
 
   AC_MSG_CHECKING([for DDlog library directory])
-  if test "$DDLOGLIBDIR" != none; then
+  if test "$DDLOGLIBDIR" != no; then
     if test ! -d "$DDLOGLIBDIR"; then
       AC_MSG_ERROR([ddlog library dir "$DDLOGLIBDIR" doesn't exist])
     elif test ! -f "$DDLOGLIBDIR"/ddlog_std.dl; then
@@ -82,7 +82,7 @@ AC_DEFUN([OVS_CHECK_DDLOG], [
   fi
   AC_MSG_RESULT([$DDLOGLIBDIR])
 
-  AM_CONDITIONAL([DDLOG], test "$DDLOGLIBDIR" != none)
+  AM_CONDITIONAL([DDLOG], [test "$DDLOGLIBDIR" != no])
 ])
 
 dnl Checks for net/if_dl.h.
diff --git a/tests/atlocal.in b/tests/atlocal.in
index c4611bfd714d..8a3907d65a20 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -212,8 +212,7 @@ 
ASAN_OPTIONS=detect_leaks=0:abort_on_error=true:log_path=asan:$ASAN_OPTIONS
 export ASAN_OPTIONS
 
 # Check whether we should run ddlog tests.
-DDLOGLIBDIR='@DDLOGLIBDIR@'
-if test x"$DDLOGLIBDIR" != x; then
+if test '@DDLOGLIBDIR@' != no; then
     TEST_DDLOG="yes"
 else
     TEST_DDLOG="no"
diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
index 843811d8c972..83b0ce1f4b1a 100644
--- a/tests/ovs-macros.at
+++ b/tests/ovs-macros.at
@@ -7,11 +7,14 @@ dnl Make AT_SETUP automatically do some things for us:
 dnl - Run the ovs_init() shell function as the first step in every test.
 dnl - If NORTHD_TYPE is defined, then append it to the test name and
 dnl   set it as a shell variable as well.
+dnl - Skip the test if it's for ovn-northd-ddlog but it didn't get built.
 m4_rename([AT_SETUP], [OVS_AT_SETUP])
 m4_define([AT_SETUP],
   [OVS_AT_SETUP($@[]m4_ifdef([NORTHD_TYPE], [ -- NORTHD_TYPE]))
 m4_ifdef([NORTHD_TYPE], [[NORTHD_TYPE]=NORTHD_TYPE
-AT_SKIP_IF([test $NORTHD_TYPE = ovn-northd-ddlog && test $TEST_DDLOG = no])
+])dnl
+m4_if(NORTHD_TYPE, [ovn-northd-ddlog], [dnl
+AT_SKIP_IF([test $TEST_DDLOG = no])
 ])dnl
 ovs_init
 ])
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to