test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error
@ 2020-01-15 22:32 xinfengx
  2020-01-15 22:32 ` [dts] [PATCH V1 2/3] nics: fix indentation error xinfengx
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: xinfengx @ 2020-01-15 22:32 UTC (permalink / raw)
  To: dts; +Cc: xinfengx

Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
---
 framework/dts.py          | 1 +
 framework/qemu_libvirt.py | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/framework/dts.py b/framework/dts.py
index 5941b37..afe44b4 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -523,6 +523,7 @@ def run_all(config_file, pkgName, git, patch, skip_setup,
     if verbose is True:
         logger.set_verbose()
 
+    re_run = int(re_run)
     if re_run < 0:
         re_run = 0
 
diff --git a/framework/qemu_libvirt.py b/framework/qemu_libvirt.py
index 5e34590..e0aeb6c 100644
--- a/framework/qemu_libvirt.py
+++ b/framework/qemu_libvirt.py
@@ -788,11 +788,11 @@ class LibvirtKvm(VirtBase):
         if os.path.exists(xml_file):
             os.remove(xml_file)
         self.root.write(xml_file)
-        with open(xml_file, 'rb') as fp:
+        with open(xml_file, 'r') as fp:
             content = fp.read()
         doc = minidom.parseString(content)
         vm_content = doc.toprettyxml(indent='    ')
-        with open(xml_file, 'wb') as fp:
+        with open(xml_file, 'w') as fp:
             fp.write(vm_content)
         self.host_session.copy_file_to(xml_file)
         time.sleep(2)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dts] [PATCH V1 2/3] nics: fix indentation error
  2020-01-15 22:32 [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error xinfengx
@ 2020-01-15 22:32 ` xinfengx
  2020-01-15 22:33 ` [dts] [PATCH V1 3/3] tests: fix the statement errors that not supported by python3 xinfengx
  2020-01-16  8:58 ` [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: xinfengx @ 2020-01-15 22:32 UTC (permalink / raw)
  To: dts; +Cc: xinfengx

Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
---
 nics/system_info.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nics/system_info.py b/nics/system_info.py
index c813cd4..da73b9f 100644
--- a/nics/system_info.py
+++ b/nics/system_info.py
@@ -40,8 +40,8 @@ from git import Repo
 class SystemInfo(object):
 
     def __init__(self, dut, pci_device_id):
-	self.dut = dut
-	self.pci_device_id = pci_device_id
+        self.dut = dut
+        self.pci_device_id = pci_device_id
         self.session = self.dut.session
         self.system_info =  OrderedDict()
         self.nic_info = OrderedDict()
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dts] [PATCH V1 3/3] tests: fix the statement errors that not supported by python3
  2020-01-15 22:32 [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error xinfengx
  2020-01-15 22:32 ` [dts] [PATCH V1 2/3] nics: fix indentation error xinfengx
@ 2020-01-15 22:33 ` xinfengx
  2020-01-16  8:58 ` [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: xinfengx @ 2020-01-15 22:33 UTC (permalink / raw)
  To: dts; +Cc: xinfengx

Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
---
 tests/TestSuite_eventdev_pipeline.py | 5 ++++-
 tests/TestSuite_telemetry.py         | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_eventdev_pipeline.py b/tests/TestSuite_eventdev_pipeline.py
index 29a42be..4818fc4 100644
--- a/tests/TestSuite_eventdev_pipeline.py
+++ b/tests/TestSuite_eventdev_pipeline.py
@@ -198,7 +198,10 @@ class TestEventdevPipeline(TestCase):
                     if packet_index == 0:
                         packet_index = int(self.pkts[i]['Raw'].load[-2:])
                         pay_load = "0000%.2d" % (packet_index)
-                    self.verify(self.pkts[i]['Raw'].load == pay_load,
+                    rev_pkt_load = self.pkts[i]['Raw'].load
+                    if isinstance(self.pkts[i]['Raw'].load, bytes):
+                        rev_pkt_load = str(self.pkts[i]['Raw'].load, encoding='utf-8')
+                    self.verify(rev_pkt_load == pay_load,
                             "%s : The packets not ordered" % case_info)
                     packet_index = packet_index + 1
 
diff --git a/tests/TestSuite_telemetry.py b/tests/TestSuite_telemetry.py
index e8ef6b7..000963b 100644
--- a/tests/TestSuite_telemetry.py
+++ b/tests/TestSuite_telemetry.py
@@ -405,7 +405,7 @@ class TestTelemetry(TestCase):
                 pformat(metric_missed_paras), ])
             error_msg.append(msg)
         # check if metric parameters and values are the same
-        if cmp(metric, xstat) != 0:
+        if metric != xstat:
             msg = 'telemetry metric data is not the same as testpmd xstat data'
             error_msg.append(msg)
             msg_fmt = 'port {} <{}>: metric is <{}>, xstat is is <{}>'.format
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error
  2020-01-15 22:32 [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error xinfengx
  2020-01-15 22:32 ` [dts] [PATCH V1 2/3] nics: fix indentation error xinfengx
  2020-01-15 22:33 ` [dts] [PATCH V1 3/3] tests: fix the statement errors that not supported by python3 xinfengx
@ 2020-01-16  8:58 ` Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2020-01-16  8:58 UTC (permalink / raw)
  To: Zhao, XinfengX, dts; +Cc: Zhao, XinfengX

Applied the series

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xinfengx
> Sent: Thursday, January 16, 2020 6:33 AM
> To: dts@dpdk.org
> Cc: Zhao, XinfengX <xinfengx.zhao@intel.com>
> Subject: [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and
> writing error
> 
> Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
> ---
>  framework/dts.py          | 1 +
>  framework/qemu_libvirt.py | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/framework/dts.py b/framework/dts.py index 5941b37..afe44b4
> 100644
> --- a/framework/dts.py
> +++ b/framework/dts.py
> @@ -523,6 +523,7 @@ def run_all(config_file, pkgName, git, patch,
> skip_setup,
>      if verbose is True:
>          logger.set_verbose()
> 
> +    re_run = int(re_run)
>      if re_run < 0:
>          re_run = 0
> 
> diff --git a/framework/qemu_libvirt.py b/framework/qemu_libvirt.py index
> 5e34590..e0aeb6c 100644
> --- a/framework/qemu_libvirt.py
> +++ b/framework/qemu_libvirt.py
> @@ -788,11 +788,11 @@ class LibvirtKvm(VirtBase):
>          if os.path.exists(xml_file):
>              os.remove(xml_file)
>          self.root.write(xml_file)
> -        with open(xml_file, 'rb') as fp:
> +        with open(xml_file, 'r') as fp:
>              content = fp.read()
>          doc = minidom.parseString(content)
>          vm_content = doc.toprettyxml(indent='    ')
> -        with open(xml_file, 'wb') as fp:
> +        with open(xml_file, 'w') as fp:
>              fp.write(vm_content)
>          self.host_session.copy_file_to(xml_file)
>          time.sleep(2)
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 22:32 [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error xinfengx
2020-01-15 22:32 ` [dts] [PATCH V1 2/3] nics: fix indentation error xinfengx
2020-01-15 22:33 ` [dts] [PATCH V1 3/3] tests: fix the statement errors that not supported by python3 xinfengx
2020-01-16  8:58 ` [dts] [PATCH V1 1/3] framework: fix the issues of dts rerun error and writing error Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	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


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox