From: ChenBo <box.c.chen@intel.com>
To: dts@dpdk.org
Cc: ChenBo <box.c.chen@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules
Date: Tue, 19 Jan 2021 16:32:20 +0800 [thread overview]
Message-ID: <20210119083220.16249-1-box.c.chen@intel.com> (raw)
The coding styles of python2 and python3 are different, modify script to adapt to python3.
Signed-off-by: ChenBo <box.c.chen@intel.com>
---
tests/TestSuite_telemetry.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_telemetry.py b/tests/TestSuite_telemetry.py
index 81e14a6c..7e474bc2 100644
--- a/tests/TestSuite_telemetry.py
+++ b/tests/TestSuite_telemetry.py
@@ -70,8 +70,8 @@ class TestTelemetry(TestCase):
with open(self.json_file, 'w') as fp:
fp.write(data)
def requestMetrics(self): # Requests metrics for given client
- self.socket.client_fd.send(METRICS_REQ)
- data = self.socket.client_fd.recv(BUFFER_SIZE)
+ self.socket.client_fd.send(METRICS_REQ.encode())
+ data = self.socket.client_fd.recv(BUFFER_SIZE).decode()
return data
def singleRequestMetrics(self):
data = self.requestMetrics()
@@ -128,7 +128,7 @@ class TestTelemetry(TestCase):
self.query_tool = ';'.join([
'cd {}'.format(self.target_dir),
'chmod 777 {}'.format(fileName),
- './' + fileName])
+ 'python3 ' + fileName])
def rename_dpdk_telemetry_tool(self):
'''
--
2.17.1
next reply other threads:[~2021-01-19 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 8:32 ChenBo [this message]
2021-01-19 8:36 ` Chen, BoX C
2021-01-19 9:13 ` Zhao, HaiyangX
2021-01-21 8:24 ` Tu, Lijuan
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=20210119083220.16249-1-box.c.chen@intel.com \
--to=box.c.chen@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).