[ovs-git] [openvswitch/ovs] 561205: tests: Get rid of overly specific --pidfile and --...

GitHub noreply at github.com
Wed Oct 12 19:26:24 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 561205007e17f699dd552c451f138c7a9c9c01dc
      https://github.com/openvswitch/ovs/commit/561205007e17f699dd552c451f138c7a9c9c01dc
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2016-10-12 (Wed, 12 Oct 2016)

  Changed paths:
    M tests/daemon-py.at
    M tests/daemon.at
    M tests/jsonrpc-py.at
    M tests/jsonrpc.at
    M tests/ofproto.at
    M tests/ovn-controller-vtep.at
    M tests/ovn-sbctl.at
    M tests/ovs-vsctl.at
    M tests/ovs-vswitchd.at
    M tests/ovs-xapi-sync.at
    M tests/ovsdb-idl.at
    M tests/ovsdb-monitor.at
    M tests/ovsdb-server.at
    M tests/ovsdb-tool.at
    M tests/vtep-ctl.at

  Log Message:
  -----------
  tests: Get rid of overly specific --pidfile and --unixctl options.

At an early point in OVS development, OVS was built with fixed default
directories for pidfiles and sockets.  This meant that it was necessary to
use lots of --pidfile and --unixctl options in the testsuite, to point the
daemons to where they should put these files (since the testsuite cannot
and generally should not touch the real system /var/run).  Later on,
the environment variables OVS_RUNDIR, OVS_LOGDIR, etc. were introduced
to override these defaults, and even later the testsuite was changed to
always set these variables correctly in every test.  Thus, these days it
isn't usually necessary to specify a filename on --pidfile or to specify
--unixctl at all.  However, many of the tests are built by cut-and-paste,
so they tended to keep appearing anyhow.  This commit drops most of them,
making the testsuite easier to read and understand.

This commit also sweeps away some other historical detritus.  In
particular, in early days of the testsuite there was no way to
automatically kill daemons when a test failed (or otherwise ended).  This
meant that some tests were littered with calls to "kill `cat pidfile`" on
almost every line (or m4 macros that expanded to the same thing) so that if
a test failed partway through the testsuite would not hang waiting for a
daemon to die that was never going to die without manual intervention.
However, a long time ago we introduced the "on_exit" mechanism that
obsoletes this.  This commit eliminates a lot of the old litter of kill
invocations, which also makes those tests easier to read.

Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Andy Zhou <azhou at ovn.org>




More information about the git mailing list