test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1 0/1] tests/pvp_share_lib: fix condition check sequence issue
@ 2019-09-12  7:54 yufengmx
  2019-09-12  7:54 ` [dts] [PATCH V1 1/1] " yufengmx
  0 siblings, 1 reply; 4+ messages in thread
From: yufengmx @ 2019-09-12  7:54 UTC (permalink / raw)
  To: dts, yinan.wang, lihongx.ma; +Cc: yufengmx

when dut ports number is zero, the condition check will raise exception of list index out of range. 

yufengmx (1):
  tests/pvp_share_lib: fix condition check sequence issue

 tests/TestSuite_pvp_share_lib.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.21.0


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

* [dts] [PATCH V1 1/1] tests/pvp_share_lib: fix condition check sequence issue
  2019-09-12  7:54 [dts] [PATCH V1 0/1] tests/pvp_share_lib: fix condition check sequence issue yufengmx
@ 2019-09-12  7:54 ` " yufengmx
  2019-09-16  1:40   ` Mo, YufengX
  2019-09-20  6:21   ` Tu, Lijuan
  0 siblings, 2 replies; 4+ messages in thread
From: yufengmx @ 2019-09-12  7:54 UTC (permalink / raw)
  To: dts, yinan.wang, lihongx.ma; +Cc: yufengmx


fix condition check sequence issue.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 tests/TestSuite_pvp_share_lib.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_pvp_share_lib.py b/tests/TestSuite_pvp_share_lib.py
index f117fd5..77c1704 100644
--- a/tests/TestSuite_pvp_share_lib.py
+++ b/tests/TestSuite_pvp_share_lib.py
@@ -46,12 +46,12 @@ class TestPVPShareLib(TestCase):
         """
         Run at the start of each test suite.
         """
-        self.core_config = "1S/4C/1T"
         self.dut_ports = self.dut.get_ports()
+        self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
+        self.core_config = "1S/4C/1T"
         self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
         self.core_list = self.dut.get_core_list(
             self.core_config, socket=self.ports_socket)
-        self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
         self.verify(len(self.core_list) >= 4,
                     "There has not enought cores to test this suite %s" %
                     self.suite_name)
-- 
2.21.0


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

* Re: [dts] [PATCH V1 1/1] tests/pvp_share_lib: fix condition check sequence issue
  2019-09-12  7:54 ` [dts] [PATCH V1 1/1] " yufengmx
@ 2019-09-16  1:40   ` Mo, YufengX
  2019-09-20  6:21   ` Tu, Lijuan
  1 sibling, 0 replies; 4+ messages in thread
From: Mo, YufengX @ 2019-09-16  1:40 UTC (permalink / raw)
  To: dts; +Cc: Wang, Yinan, Ma, LihongX

tested by yufengx.mo@intel.com

> -----Original Message-----
> From: Mo, YufengX
> Sent: Thursday, September 12, 2019 3:54 PM
> To: dts@dpdk.org; Wang, Yinan <yinan.wang@intel.com>; Ma, LihongX <lihongx.ma@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts][PATCH V1 1/1] tests/pvp_share_lib: fix condition check sequence issue
> 
> 
> fix condition check sequence issue.
> 
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
>  tests/TestSuite_pvp_share_lib.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_pvp_share_lib.py b/tests/TestSuite_pvp_share_lib.py
> index f117fd5..77c1704 100644
> --- a/tests/TestSuite_pvp_share_lib.py
> +++ b/tests/TestSuite_pvp_share_lib.py
> @@ -46,12 +46,12 @@ class TestPVPShareLib(TestCase):
>          """
>          Run at the start of each test suite.
>          """
> -        self.core_config = "1S/4C/1T"
>          self.dut_ports = self.dut.get_ports()
> +        self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
> +        self.core_config = "1S/4C/1T"
>          self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
>          self.core_list = self.dut.get_core_list(
>              self.core_config, socket=self.ports_socket)
> -        self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
>          self.verify(len(self.core_list) >= 4,
>                      "There has not enought cores to test this suite %s" %
>                      self.suite_name)
> --
> 2.21.0


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

* Re: [dts] [PATCH V1 1/1] tests/pvp_share_lib: fix condition check sequence issue
  2019-09-12  7:54 ` [dts] [PATCH V1 1/1] " yufengmx
  2019-09-16  1:40   ` Mo, YufengX
@ 2019-09-20  6:21   ` Tu, Lijuan
  1 sibling, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2019-09-20  6:21 UTC (permalink / raw)
  To: Mo, YufengX, dts, Wang, Yinan, Ma, LihongX; +Cc: Mo, YufengX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx
> Sent: Thursday, September 12, 2019 3:54 PM
> To: dts@dpdk.org; Wang, Yinan <yinan.wang@intel.com>; Ma, LihongX
> <lihongx.ma@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 1/1] tests/pvp_share_lib: fix condition check
> sequence issue
> 
> 
> fix condition check sequence issue.
> 
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
>  tests/TestSuite_pvp_share_lib.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_pvp_share_lib.py
> b/tests/TestSuite_pvp_share_lib.py
> index f117fd5..77c1704 100644
> --- a/tests/TestSuite_pvp_share_lib.py
> +++ b/tests/TestSuite_pvp_share_lib.py
> @@ -46,12 +46,12 @@ class TestPVPShareLib(TestCase):
>          """
>          Run at the start of each test suite.
>          """
> -        self.core_config = "1S/4C/1T"
>          self.dut_ports = self.dut.get_ports()
> +        self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
> +        self.core_config = "1S/4C/1T"
>          self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
>          self.core_list = self.dut.get_core_list(
>              self.core_config, socket=self.ports_socket)
> -        self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
>          self.verify(len(self.core_list) >= 4,
>                      "There has not enought cores to test this suite %s" %
>                      self.suite_name)
> --
> 2.21.0


^ 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 --
2019-09-12  7:54 [dts] [PATCH V1 0/1] tests/pvp_share_lib: fix condition check sequence issue yufengmx
2019-09-12  7:54 ` [dts] [PATCH V1 1/1] " yufengmx
2019-09-16  1:40   ` Mo, YufengX
2019-09-20  6:21   ` 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