On 29 August 2016 at 11:30, Paul Boca <pb...@cloudbasesolutions.com> wrote:

>
>
>
>
> *From:* Guru Shetty [mailto:g...@ovn.org]
> *Sent:* Monday, August 29, 2016 9:20 PM
> *To:* Paul Boca
> *Cc:* dev@openvswitch.org
> *Subject:* Re: [ovs-dev] [PATCH 08/12] python tests: Ignore stderr output
>
>
>
>
>
> So you are saying that running $srcdir/test-unixctl.py on Windows
> produces output in stderr. Why? Is there a bug with Windows port?
>
> *[Paul Boca] *This is the way logging library works on both Windows and
> Linux (https://docs.python.org/2/howto/logging.html -
>
> “If you call the functions *debug()*
> <https://docs.python.org/2/library/logging.html#logging.debug>, *info()*
> <https://docs.python.org/2/library/logging.html#logging.info>,*warning()*
> <https://docs.python.org/2/library/logging.html#logging.warning>,
> *error()* <https://docs.python.org/2/library/logging.html#logging.error>
>  and *critical()*
> <https://docs.python.org/2/library/logging.html#logging.critical>, they
> will check to see if no
>
> destination is set; and if one is not set, they will set a destination of
> the console (sys.stderr)”)
>
> but the difference is that on Windows the stderr is appended in a file
> (the same file) and on Linux a stderr instance
>
> is used for every command.
>
>
>
> I understand what you are trying to say. My question is a little different.
>
> If I add the following incremental, vlog tests in Linux fail and this is
> because something is printed in stderr:
>
>
>
> diff --git a/tests/test-unixctl.py b/tests/test-unixctl.py
>
> index 5de51d3..f85de39 100644
>
> --- a/tests/test-unixctl.py
>
> +++ b/tests/test-unixctl.py
>
> @@ -76,6 +76,8 @@ def main():
>
>      ovs.unixctl.command_register("block", "", 0, 0, unixctl_block, None)
>
>      ovs.daemon.daemonize_complete()
>
>
>
> +    vlog.err("oink")
>
> +
>
>      vlog.info("Entering run loop.")
>
>      poller = ovs.poller.Poller()
>
>      while not exiting:
>
>
>
> So the question is - what is it that gets printed in Windows in stderr?
> What specific test fails?
>
>
>
> *[Paul Boca] On Windows I saw that “Entering run loop." gets printed in
> stderr.*
>
> *If I apply your incremental, both “oink” and “Entering run loop” are
> printed in stderr.*
>
> *Maybe there is a difference how logging library works on Windows, I don’t
> have too much experience with it.*
>

Would you mind investigating a bit here? We don't want to miss a porting
bug.


> *I will take a look, maybe I missed something, but the vlog.py is the same
> for both Windows and Linux.*
>
>
>
>
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to