* [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules
@ 2021-01-19 8:32 ChenBo
2021-01-19 8:36 ` Chen, BoX C
2021-01-21 8:24 ` Tu, Lijuan
0 siblings, 2 replies; 4+ messages in thread
From: ChenBo @ 2021-01-19 8:32 UTC (permalink / raw)
To: dts; +Cc: ChenBo
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules
2021-01-19 8:32 [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules ChenBo
@ 2021-01-19 8:36 ` Chen, BoX C
2021-01-19 9:13 ` Zhao, HaiyangX
2021-01-21 8:24 ` Tu, Lijuan
1 sibling, 1 reply; 4+ messages in thread
From: Chen, BoX C @ 2021-01-19 8:36 UTC (permalink / raw)
To: Chen, BoX C, dts
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
Tested-by: ChenBo <box.c.chen@intel.com>
Regards,
Chen Bo
> -----Original Message-----
> From: ChenBo <box.c.chen@intel.com>
> Sent: January 19, 2021 16:32
> To: dts@dpdk.org
> Cc: Chen, BoX C <box.c.chen@intel.com>
> Subject: [dts][PATCH V1] tests/TestSuite_telemetry: Adapting python3 code
[-- Attachment #2: TestTelemetry.log --]
[-- Type: application/octet-stream, Size: 16913 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules
2021-01-19 8:36 ` Chen, BoX C
@ 2021-01-19 9:13 ` Zhao, HaiyangX
0 siblings, 0 replies; 4+ messages in thread
From: Zhao, HaiyangX @ 2021-01-19 9:13 UTC (permalink / raw)
To: Chen, BoX C, Chen, BoX C, dts
Acked-by: Haiyang Zhao <haiyangx.zhao@intel.com>
Best Regards,
Zhao Haiyang
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Chen, BoX C
> Sent: Tuesday, January 19, 2021 16:37
> To: Chen, BoX C <box.c.chen@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3
> code rules
>
> Tested-by: ChenBo <box.c.chen@intel.com>
>
> Regards,
> Chen Bo
>
> > -----Original Message-----
> > From: ChenBo <box.c.chen@intel.com>
> > Sent: January 19, 2021 16:32
> > To: dts@dpdk.org
> > Cc: Chen, BoX C <box.c.chen@intel.com>
> > Subject: [dts][PATCH V1] tests/TestSuite_telemetry: Adapting python3
> code
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules
2021-01-19 8:32 [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules ChenBo
2021-01-19 8:36 ` Chen, BoX C
@ 2021-01-21 8:24 ` Tu, Lijuan
1 sibling, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2021-01-21 8:24 UTC (permalink / raw)
To: Chen, BoX C, dts; +Cc: Chen, BoX C
> Subject: [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code
> rules
>
> The coding styles of python2 and python3 are different, modify script to
> adapt to python3.
>
> Signed-off-by: ChenBo <box.c.chen@intel.com>
Applied, next time please:
1, remove prefix "TestSuite" in subject to reduce text count
2, don't use capitals in general
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-21 8:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 8:32 [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules ChenBo
2021-01-19 8:36 ` Chen, BoX C
2021-01-19 9:13 ` Zhao, HaiyangX
2021-01-21 8:24 ` Tu, Lijuan
test suite reviews and discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
dts@dpdk.org
public-inbox-index dts
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.dpdk.org/inbox.dpdk.dts
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git