* [dts] [PATCH V1] framework/tester: optimize scripts
@ 2023-07-12 14:14 Jiale Song
0 siblings, 0 replies; only message in thread
From: Jiale Song @ 2023-07-12 14:14 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
timed out execution of Scapy "quit()" command will cause dts to end running.
method of reducing command timeout:
1. increase timeout time.
2. ensure that the "quit()" command line is executed in scapy.
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
framework/tester.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/framework/tester.py b/framework/tester.py
index 5e6c72ad..d577c29e 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -866,7 +866,9 @@ class Tester(Crb):
if self.scapy_sessions_li:
for i in self.scapy_sessions_li:
if i.session.isalive():
- i.session.send_expect("quit()", "#", timeout=2)
+ out = i.session.send_command("^C")
+ if ">>>" in out:
+ i.session.send_expect("quit()", "# ", timeout=5)
i.session.close()
self.scapy_sessions_li.clear()
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-12 5:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-12 14:14 [dts] [PATCH V1] framework/tester: optimize scripts Jiale Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).