Skip to contentSkip to conversation

runfvp: Stop the FVP when telnet shuts down cleanly

PATCH Applied Peter Hoyes 2 participants 3 messages Aug 3, 2022 – Aug 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 runfvp: Stop the FVP when telnet shuts down cleanly

From: Peter Hoyes <[email protected]>

At the moment, when using the --console flag, if telnet is shut down cleanly (i.e. by typing "quit" at the prompt instead of Ctrl+C), runfvp still waits on the FVP to exit of its own accord, so hangs.

Move the fvp.run() call so that when telnet quits, it immediately proceeds to shut down the FVP.

Issue-Id: SCM-4954

Change-Id I2169c99586a1eebc2c6ab4b2e15fb0c769fc81a8
---
 scripts/runfvp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/runfvp +1 -1
index 9fb77d3..c5a74b2 100755
@@ -64,8 +64,8 @@ async def start_fvp(args, config, extra_args):
             logger.debug(f"Telnet quit, cancelling tasks")
         else:
             fvp.add_line_callback(lambda line: print(line))
+            await fvp.run()
 
-        await fvp.run()
     finally:
         await fvp.stop()
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 21 lines · Peter Hoyes

From: Peter Hoyes <[email protected]>

At the moment, when using the --console flag, if telnet is shut down cleanly (i.e. by typing "quit" at the prompt instead of Ctrl+C), runfvp still waits on the FVP to exit of its own accord, so hangs.

Move the fvp.run() call so that when telnet quits, it immediately proceeds to shut down the FVP.

Issue-Id: SCM-4954

Change-Id I2169c99586a1eebc2c6ab4b2e15fb0c769fc81a8
---
  scripts/runfvp | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
scripts/runfvp +0 -0
index 9fb77d3..c5a74b2 100755

scripts/runfvp async def start_fvp(args, config, extra_args): · line 71

Quoted 9 lines
scripts/runfvp +1 -1
@@ -64,8 +64,8 @@ async def start_fvp(args, config, extra_args):
              logger.debug(f"Telnet quit, cancelling tasks")
          else:
              fvp.add_line_callback(lambda line: print(line))
+            await fvp.run()
 
-        await fvp.run()
      finally:
          await fvp.stop()
 

Please can this also be backported to kirkstone

Applied
#2 lore raw
In reply to Peter Hoyes
Quoted 6 lines · Peter Hoyes

At the moment, when using the --console flag, if telnet is shut down cleanly (i.e. by typing "quit" at the prompt instead of Ctrl+C), runfvp still waits on the FVP to exit of its own accord, so hangs.

Move the fvp.run() call so that when telnet quits, it immediately proceeds to shut down the FVP.

Applied, thanks!

[1/1] runfvp: Stop the FVP when telnet shuts down cleanly

      commit: 025fb194f528000b6f2c49a30b126d512295022b

Best regards,

Signature · 1 line
Jon Mason <[email protected]>