mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] test: py: network: await prompt after ctrl+c
@ 2026-02-25 14:15 Ahmad Fatoum
  2026-02-26 12:14 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-02-25 14:15 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The expect buffer will contain the <INTERRUPT> string output by barebox
followed by a prompt, which run_check would gobble up.

Currently, this doesn't matter, but when we start to additionally match
against the plain prompt, this would lead us not to match the prompt
string with the marker in run_check.
To fix this, _await_prompt to get the <INTERRUPT><prompt> removed from
the expect buffer.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 test/py/test_network.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/py/test_network.py b/test/py/test_network.py
index e76aad1cc6f6..e22da0680204 100644
--- a/test/py/test_network.py
+++ b/test/py/test_network.py
@@ -67,6 +67,7 @@ def tftp_conversation(barebox, barebox_interface, guestaddr):
     finally:
         # terminate a timed-out tftp
         barebox.console.sendcontrol("c")
+        barebox._await_prompt()
         tftp_thread.join()
         barebox.run_check("ifdown eth0")
 
-- 
2.47.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-26 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-25 14:15 [PATCH] test: py: network: await prompt after ctrl+c Ahmad Fatoum
2026-02-26 12:14 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox