[ovs-git] [openvswitch/ovs] 46fc80: tests: Kill the daemons at cleanup only if pidfile...
noreply at github.com
Tue Dec 26 17:44:43 UTC 2017
Author: Jakub Sitnicki <jkbs at redhat.com>
Date: 2017-12-26 (Tue, 26 Dec 2017)
tests: Kill the daemons at cleanup only if pidfile exists.
Remembering the PIDs of started daemon processes and killing them during
cleanup can interfere with other tests.
When the tests are running in parallel (i.e., -jX was passed in
TESTSUITEFLAGS), PIDs of daemons that have terminated before the cleanup
are subject to reuse by processes, or threads, spawned in another test.
This means that, while executing its 'cleanup' script, one test can
accidentally send a SIGTERM to a process running as a part of another
test and influence its outcome.
Retrieve the PID of the process we intend to kill at the last possible
moment to narrow down the window of opportunity for interfering.
This approach has a downside that if the daemon's pidfile has
disappeared but the process has not terminated, we will not clean it up
at the end of the test.
Signed-off-by: Jakub Sitnicki <jkbs at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
More information about the git