From: Jiale Song <songx.jiale@intel.com>
To: dts@dpdk.org
Cc: Jiale Song <songx.jiale@intel.com>
Subject: [dts] [PATCH V1] framework/tester: optimize scripts
Date: Wed, 12 Jul 2023 22:14:06 +0800 [thread overview]
Message-ID: <20230712141406.978846-1-songx.jiale@intel.com> (raw)
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
reply other threads:[~2023-07-12 5:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230712141406.978846-1-songx.jiale@intel.com \
--to=songx.jiale@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).