Message ID | 1466787108-25580-1-git-send-email-pboca@cloudbasesolutions.com |
---|---|
State | Accepted |
Delegated to: | Guru Shetty |
Headers | show |
----- Original Message ----- > From: "Paul Boca" <pboca@cloudbasesolutions.com> > To: dev@openvswitch.org > Sent: Friday, June 24, 2016 12:51:49 PM > Subject: [ovs-dev] [PATCH] tests: Fixed ovsdb-monitor tests > > Redirect ovsdb-client stderr to /dev/null. > This fixes the series of tests:1770 1771 1772 1773 1774 1775 1776 1777 > 1778 1779 1780 > > Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> > --- > tests/ovsdb-monitor.at | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at > index 0649f2a..03690ba 100644 > --- a/tests/ovsdb-monitor.at > +++ b/tests/ovsdb-monitor.at > @@ -26,12 +26,13 @@ m4_define([OVSDB_CHECK_MONITOR], > AT_CAPTURE_FILE([ovsdb-server-log]) > AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/server-pid > --remote=punix:socket --unixctl="`pwd`"/unixctl > --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1], > [0], [], []) > + AT_CAPTURE_FILE([ovsdb-client-log]) > if test "$IS_WIN32" = "yes"; then > - AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid -d json > monitor --format=csv unix:socket $4 $5 $8 > output &], > + AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid > --log-file="`pwd`"/ovsdb-client-log -d json monitor --format=csv unix:socket > $4 $5 $8 > output 2>/dev/null &], > [0], [ignore], [ignore], [kill `cat server-pid`]) > sleep 1 > else > - AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir > --pidfile="`pwd`"/client-pid -d json monitor --format=csv unix:socket $4 $5 > $8 > output], > + AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir > --pidfile="`pwd`"/client-pid --log-file="`pwd`"/ovsdb-client-log -d json > monitor --format=csv unix:socket $4 $5 $8 > output], > [0], [ignore], [ignore], [kill `cat server-pid`]) > fi > m4_foreach([txn], [$6], > -- > 2.7.2.windows.1 > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev > LGTM, applied and tested. Acked-by: Lance Richardson <lrichard@redhat.com>
On 24 June 2016 at 09:51, Paul Boca <pboca@cloudbasesolutions.com> wrote: > Redirect ovsdb-client stderr to /dev/null. > This fixes the series of tests:1770 1771 1772 1773 1774 1775 1776 1777 > 1778 1779 1780 > > Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> > --- > tests/ovsdb-monitor.at | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at > index 0649f2a..03690ba 100644 > --- a/tests/ovsdb-monitor.at > +++ b/tests/ovsdb-monitor.at > @@ -26,12 +26,13 @@ m4_define([OVSDB_CHECK_MONITOR], > AT_CAPTURE_FILE([ovsdb-server-log]) > AT_CHECK([ovsdb-server --detach --no-chdir > --pidfile="`pwd`"/server-pid --remote=punix:socket > --unixctl="`pwd`"/unixctl --log-file="`pwd`"/ovsdb-server-log db >/dev/null > 2>&1], > [0], [], []) > + AT_CAPTURE_FILE([ovsdb-client-log]) > if test "$IS_WIN32" = "yes"; then > - AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid -d > json monitor --format=csv unix:socket $4 $5 $8 > output &], > + AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid > --log-file="`pwd`"/ovsdb-client-log -d json monitor --format=csv > unix:socket $4 $5 $8 > output 2>/dev/null &], > Is the addition of --log-file an unrelated change? Or was it required to fix the tests somehow? > [0], [ignore], [ignore], [kill `cat server-pid`]) > sleep 1 > else > - AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir > --pidfile="`pwd`"/client-pid -d json monitor --format=csv unix:socket $4 $5 > $8 > output], > + AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir > --pidfile="`pwd`"/client-pid --log-file="`pwd`"/ovsdb-client-log -d json > monitor --format=csv unix:socket $4 $5 $8 > output], > [0], [ignore], [ignore], [kill `cat server-pid`]) > fi > m4_foreach([txn], [$6], > -- > 2.7.2.windows.1 > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev >
----- Original Message ----- > From: "Guru Shetty" <guru@ovn.org> > To: "Paul Boca" <pboca@cloudbasesolutions.com> > Cc: dev@openvswitch.org > Sent: Friday, June 24, 2016 2:50:35 PM > Subject: Re: [ovs-dev] [PATCH] tests: Fixed ovsdb-monitor tests > > On 24 June 2016 at 09:51, Paul Boca <pboca@cloudbasesolutions.com> wrote: > > > Redirect ovsdb-client stderr to /dev/null. > > This fixes the series of tests:1770 1771 1772 1773 1774 1775 1776 1777 > > 1778 1779 1780 > > > > Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> > > --- > > tests/ovsdb-monitor.at | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at > > index 0649f2a..03690ba 100644 > > --- a/tests/ovsdb-monitor.at > > +++ b/tests/ovsdb-monitor.at > > @@ -26,12 +26,13 @@ m4_define([OVSDB_CHECK_MONITOR], > > AT_CAPTURE_FILE([ovsdb-server-log]) > > AT_CHECK([ovsdb-server --detach --no-chdir > > --pidfile="`pwd`"/server-pid --remote=punix:socket > > --unixctl="`pwd`"/unixctl --log-file="`pwd`"/ovsdb-server-log db >/dev/null > > 2>&1], > > [0], [], []) > > + AT_CAPTURE_FILE([ovsdb-client-log]) > > if test "$IS_WIN32" = "yes"; then > > - AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid -d > > json monitor --format=csv unix:socket $4 $5 $8 > output &], > > + AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid > > --log-file="`pwd`"/ovsdb-client-log -d json monitor --format=csv > > unix:socket $4 $5 $8 > output 2>/dev/null &], > > > > Is the addition of --log-file an unrelated change? Or was it required to > fix the tests somehow? Hi Guru, See Ben Pfaff's explanation in: http://openvswitch.org/pipermail/dev/2016-June/072671.html Paul, it would be good to include that explanation in the commit log to help future readers understand the rationale for these changes. Thanks, Lance > > > [0], [ignore], [ignore], [kill `cat server-pid`]) > > sleep 1 > > else > > - AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir > > --pidfile="`pwd`"/client-pid -d json monitor --format=csv unix:socket $4 $5 > > $8 > output], > > + AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir > > --pidfile="`pwd`"/client-pid --log-file="`pwd`"/ovsdb-client-log -d json > > monitor --format=csv unix:socket $4 $5 $8 > output], > > [0], [ignore], [ignore], [kill `cat server-pid`]) > > fi > > m4_foreach([txn], [$6], > > -- > > 2.7.2.windows.1 > > _______________________________________________ > > dev mailing list > > dev@openvswitch.org > > http://openvswitch.org/mailman/listinfo/dev > > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev >
On 24 June 2016 at 09:51, Paul Boca <pboca@cloudbasesolutions.com> wrote: > Redirect ovsdb-client stderr to /dev/null. > This fixes the series of tests:1770 1771 1772 1773 1774 1775 1776 1777 > 1778 1779 1780 > Please don't mention the test numbers in the commit messages. The test numbers change when new tests are added. So if new tests are added by the time you wrote the above commit message and the time someone applies it, the commit message would become faulty. So I removed it. I also added Ben's theory as part of the commit message as suggested by Lance And applied it. Thanks! With this fix, does unit tests pass again on Windows (other than the python ones) ? > > Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> > --- > tests/ovsdb-monitor.at | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at > index 0649f2a..03690ba 100644 > --- a/tests/ovsdb-monitor.at > +++ b/tests/ovsdb-monitor.at > @@ -26,12 +26,13 @@ m4_define([OVSDB_CHECK_MONITOR], > AT_CAPTURE_FILE([ovsdb-server-log]) > AT_CHECK([ovsdb-server --detach --no-chdir > --pidfile="`pwd`"/server-pid --remote=punix:socket > --unixctl="`pwd`"/unixctl --log-file="`pwd`"/ovsdb-server-log db >/dev/null > 2>&1], > [0], [], []) > + AT_CAPTURE_FILE([ovsdb-client-log]) > if test "$IS_WIN32" = "yes"; then > - AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid -d > json monitor --format=csv unix:socket $4 $5 $8 > output &], > + AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid > --log-file="`pwd`"/ovsdb-client-log -d json monitor --format=csv > unix:socket $4 $5 $8 > output 2>/dev/null &], > [0], [ignore], [ignore], [kill `cat server-pid`]) > sleep 1 > else > - AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir > --pidfile="`pwd`"/client-pid -d json monitor --format=csv unix:socket $4 $5 > $8 > output], > + AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir > --pidfile="`pwd`"/client-pid --log-file="`pwd`"/ovsdb-client-log -d json > monitor --format=csv unix:socket $4 $5 $8 > output], > [0], [ignore], [ignore], [kill `cat server-pid`]) > fi > m4_foreach([txn], [$6], > -- > 2.7.2.windows.1 > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev >
diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at index 0649f2a..03690ba 100644 --- a/tests/ovsdb-monitor.at +++ b/tests/ovsdb-monitor.at @@ -26,12 +26,13 @@ m4_define([OVSDB_CHECK_MONITOR], AT_CAPTURE_FILE([ovsdb-server-log]) AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/server-pid --remote=punix:socket --unixctl="`pwd`"/unixctl --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1], [0], [], []) + AT_CAPTURE_FILE([ovsdb-client-log]) if test "$IS_WIN32" = "yes"; then - AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid -d json monitor --format=csv unix:socket $4 $5 $8 > output &], + AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid --log-file="`pwd`"/ovsdb-client-log -d json monitor --format=csv unix:socket $4 $5 $8 > output 2>/dev/null &], [0], [ignore], [ignore], [kill `cat server-pid`]) sleep 1 else - AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir --pidfile="`pwd`"/client-pid -d json monitor --format=csv unix:socket $4 $5 $8 > output], + AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir --pidfile="`pwd`"/client-pid --log-file="`pwd`"/ovsdb-client-log -d json monitor --format=csv unix:socket $4 $5 $8 > output], [0], [ignore], [ignore], [kill `cat server-pid`]) fi m4_foreach([txn], [$6],
Redirect ovsdb-client stderr to /dev/null. This fixes the series of tests:1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> --- tests/ovsdb-monitor.at | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)