3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:29:23 +01:00

auto-t: testNetconfig stop dhcpd correctly

Use stop_process instead of kill as this removes the process
from the test context.
This commit is contained in:
James Prestwood 2021-02-25 14:00:53 -08:00 committed by Denis Kenzior
parent e8389190a9
commit e5a66bf51f

View File

@ -70,8 +70,9 @@ class Test(unittest.TestCase):
@classmethod
def tearDownClass(cls):
IWD.clear_storage()
cls.dhcpd_pid.kill()
os.system('rm -rf /tmp/dhcpd.leases')
ctx.stop_process(cls.dhcpd_pid)
cls.dhcpd_pid = None
os.remove('/tmp/dhcpd.leases')
if __name__ == '__main__':
unittest.main(exit=True)