Ensure get_pid_to_kill works with rootwrap script
To ensure that correct process is killed when using a rootwrap script, we must recursively list the children of our top-level process and kill the last one. This patch uses the psutil python module which is already used in the heat-cfntools project. Change-Id: I702bb9dd794c08fcaab637284ee303de1778cbb9
This commit is contained in:
@@ -69,7 +69,8 @@ class BaseMonitorTest(base.BaseTestCase):
|
||||
|
||||
self._check_test_requirements()
|
||||
|
||||
self.root_helper = 'sudo'
|
||||
# Emulate using a rootwrap script with sudo
|
||||
self.root_helper = 'sudo sudo'
|
||||
self.ovs = ovs_lib.BaseOVS(self.root_helper)
|
||||
self.bridge = create_ovs_resource('test-br-', self.ovs.add_bridge)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user