1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-08 05:09:56 +00:00

arm/oeqa/fvp: handle the FVP process exiting

If the FVP has already quit when we're stopping an exception is raised,
so catch that and do nothing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ross Burton
2021-10-25 14:01:21 +01:00
committed by Jon Mason
parent 99e57b7788
commit 9a485a96d3
+4 -3
View File
@@ -75,13 +75,14 @@ class OEFVPTarget(oeqa.core.target.ssh.OESSHTarget):
def stop(self, **kwargs):
loop = asyncio.get_event_loop()
# Kill the process group so that the telnet and FVP die too
gid = os.getpgid(self.fvp.pid)
try:
# Kill the process group so that the telnet and FVP die too
gid = os.getpgid(self.fvp.pid)
self.logger.debug(f"Sending SIGTERM to {gid}")
os.killpg(gid, signal.SIGTERM)
loop.run_until_complete(asyncio.wait_for(self.fvp.wait(), 10))
except TimeoutError:
self.logger.debug(f"Timed out, sending SIGKILL to {gid}")
os.killpg(gid, signal.SIGKILL)
except ProcessLookupError:
return