* [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* Re: [PATCH] test: py: network: await prompt after ctrl+c
2026-02-25 14:15 [PATCH] test: py: network: await prompt after ctrl+c Ahmad Fatoum
@ 2026-02-26 12:14 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2026-02-26 12:14 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Wed, 25 Feb 2026 15:15:34 +0100, Ahmad Fatoum wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] test: py: network: await prompt after ctrl+c
https://git.pengutronix.de/cgit/barebox/commit/?id=ca40477c067d (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ 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