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

auto-t: fix testAgent use of Process

This test was accessing the subprocess object and calling terminate
which ends up causing issues with test-runners own process cleanup.
Instead kill() should be used.
This commit is contained in:
James Prestwood 2021-08-13 13:26:07 -07:00 committed by Denis Kenzior
parent 82d7c81bd3
commit c2caa325ba

View File

@ -58,14 +58,13 @@ class Test(unittest.TestCase):
def test_connection_with_other_agent(self):
wd = IWD()
iwctl = ctx.start_process(['iwctl', '-P', 'secret_ssid2']).pid
iwctl = ctx.start_process(['iwctl', '-P', 'secret_ssid2'])
# Let iwctl to start and register its agent.
wd.wait(2)
self.check_connection(wd, 'ssid2')
iwctl.terminate()
iwctl.communicate()
iwctl.kill()
IWD.clear_storage()
@ -73,7 +72,7 @@ class Test(unittest.TestCase):
wd = IWD()
iwctl = ctx.start_process(['iwctl', '-P', 'secret_ssid2']).pid
iwctl = ctx.start_process(['iwctl', '-P', 'secret_ssid2'])
# Let iwctl to start and register its agent.
wd.wait(2)
@ -84,8 +83,7 @@ class Test(unittest.TestCase):
wd.unregister_psk_agent(psk_agent)
iwctl.terminate()
iwctl.communicate()
iwctl.kill()
IWD.clear_storage()