[ovs-dev] [PATCH] tests: Simplify and improve the daemon tests.

Alin Gabriel Serdean aserdean at ovn.org
Thu Dec 6 13:58:34 UTC 2018



> On 29 Oct 2018, at 18:25, Ben Pfaff <blp at ovn.org> wrote:
> 
> The daemon tests used files a lot when shell variables were easier to use
> and easier to understand.  This commit changes that.
> 
> The tests created empty databases that aren't really needed anymore.  This
> commit changes them to use the ovsdb-server --no-db option instead.
> 
> The tests had a lot of common code for checking the ancestry of processes.
> This commit factors out a new shell function check_ancestors.
> 
> The tests tended to use random pidfile names.  This switches to just using
> the defaults, which are fine.
> 
> The tests didn't check the names of the child processes.  This adds those
> checks using the new check_process_name shell function.  This should avoid
> regression of the bug fixed by commit 266f79e32c60 ("daemon-unix: Use
> same name for original or restarted children.")
> 
> Other minor improvements too.
> 
> I only made small updates to the Windows-specific test, because it is hard
> for me to verify.
> 
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---
> tests/daemon-py.at | 218 +++++++++++++++++++++++++----------------------------
> tests/daemon.at    | 214 +++++++++++++++++++++++++++++-----------------------
> 2 files changed, 222 insertions(+), 210 deletions(-)
> 


This looks good to me but it needs a rebase.

I tested with the patch applied on top of
commit 4123c2123a0aba7752d881dbd220437407d52698
and everything seems ok.

I can do another sanity check once the patch is rebased.

Acked-by: Alin Gabriel Serdean <aserdean at ovn.org <mailto:aserdean at ovn.org>>



More information about the dev mailing list