[ovs-dev] [PATCH V2 02/10] python tests: Skip python tests that kill the python daemon

Guru Shetty guru at ovn.org
Wed Aug 31 18:05:10 UTC 2016


On 31 August 2016 at 00:45, Paul Boca <pboca at cloudbasesolutions.com> wrote:

> Hi Guru,
>
>
>
> There are other tests that check if the daemon is running fine.
>
> In my opinion we could skip this test on Windows and let it on Linux to
> run.
>

All right. I applied this.

>
>
> Paul
>
>
>
> *From:* Guru Shetty [mailto:guru at ovn.org]
> *Sent:* Tuesday, August 30, 2016 6:18 PM
> *To:* Paul Boca
> *Cc:* dev at openvswitch.org
> *Subject:* Re: [ovs-dev] [PATCH V2 02/10] python tests: Skip python tests
> that kill the python daemon
>
>
>
>
>
>
>
> On 30 August 2016 at 05:00, Paul Boca <pboca at cloudbasesolutions.com>
> wrote:
>
> If the python script is killed with `kill` command, the atexit
> handler doesn't gets executed on Windows.
> The kill of the process is done using NtTerminateProcess which
> doesn't sends a signal to the process itself, if just terminates the
> process
> from kernel mode.
>
> Signed-off-by: Paul-Daniel Boca <pboca at cloudbasesolutions.com>
>
>
>
> Instead of skipping the test, why not just skip the line that tests for
> pid after the process is killed. I imagine that the test is still useful in
> other respects, like whether detach works fine?
>
>
>
> ---
> V2: Initial commit
> ---
>  tests/daemon-py.at | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/daemon-py.at b/tests/daemon-py.at
> index 96dea07..11833c8 100644
> --- a/tests/daemon-py.at
> +++ b/tests/daemon-py.at
> @@ -126,6 +126,8 @@ DAEMON_MONITOR_RESTART_PYN([Python3],
> [$HAVE_PYTHON3], [$PYTHON3])
>  m4_define([DAEMON_DETACH_PYN],
>    [AT_SETUP([daemon --detach - $1])
>     AT_SKIP_IF([test $2 = no])
> +   # Skip this test for Windows, the pid file not removed if the daemon
> is killed
> +   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
>     AT_CAPTURE_FILE([pid])
>     # Start the daemon and make sure that the pidfile exists immediately.
>     # We don't wait for the pidfile to get created because the daemon is
> --
> 2.7.2.windows.1
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
>
>



More information about the dev mailing list