test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1] tests/TestSuite_blacklist:Modify the verification method of blacklist equipment
@ 2020-05-14  2:56 xizhan4x
  2020-05-14  3:03 ` Zhang, XiX
  2020-05-19  1:57 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: xizhan4x @ 2020-05-14  2:56 UTC (permalink / raw)
  To: dts; +Cc: xizhan4x



Echo changes after testpmd starts,Modify the verification method of blacklist equipment

Signed-off-by: xizhan4x <xix.zhang@intel.com>
---
 tests/TestSuite_blacklist.py | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py
index eb56759..64360bb 100644
--- a/tests/TestSuite_blacklist.py
+++ b/tests/TestSuite_blacklist.py
@@ -36,6 +36,7 @@ Test device blacklisting.
 import utils
 from test_case import TestCase
 from pmd_output import PmdOutput
+from settings import DRIVERS
 
 class TestBlackList(TestCase):
     def set_up_all(self):
@@ -48,11 +49,7 @@ class TestBlackList(TestCase):
         self.ports = self.dut.get_ports(self.nic)
         self.verify(len(self.ports) >= 2, "Insufficient ports for testing")
         [arch, machine, self.env, toolchain] = self.target.split('-')
-
-        if self.env == 'bsdapp':
-            self.regexp_blacklisted_port = "EAL: PCI device 0000:%02x:%s on NUMA socket [-0-9]+[^\n]*\nEAL:   Device is blacklisted, not initializing"
-        else:
-            self.regexp_blacklisted_port = "EAL: PCI device %s on NUMA socket [-0-9]+[^\n]*\nEAL:   Device is blacklisted, not initializing"
+        self.regexp_blacklisted_port = "Probe PCI driver: net_%s \(%s\) device: %s \(socket [-0-9]+\)"
         self.pmdout = PmdOutput(self.dut)
 
     def set_up(self):
@@ -73,17 +70,18 @@ class TestBlackList(TestCase):
             # Look for the PCI ID of each card followed by
             # "Device is blacklisted, not initializing" but avoid to consume more
             # than one device.
-            if self.env == 'bsdapp':
-                pci = self.dut.ports_info[port]['pci']
-                regexp_blacklisted_port = self.regexp_blacklisted_port % (int(pci.split(':')[0], 16), pci.split(':')[1])
-            else:
-                regexp_blacklisted_port = self.regexp_blacklisted_port % self.dut.ports_info[port]['pci']
+            port_pci = self.dut.ports_info[port]['pci']
+            if self.env == "bsdapp":
+                port_pci = ':'.join(["0000", port_pci])
+            regexp_blacklisted_port = self.regexp_blacklisted_port % (
+                DRIVERS.get(self.nic), self.dut.ports_info[port]['type'],
+                port_pci)
             matching_ports = utils.regexp(output, regexp_blacklisted_port, True)
             if blacklisted:
-                self.verify(len(matching_ports) == 1,
+                self.verify(len(matching_ports) == 0,
                             "Blacklisted port is being initialized")
             else:
-                self.verify(len(matching_ports) == 0,
+                self.verify(len(matching_ports) == 1,
                             "Not blacklisted port is being blacklisted")
 
     def test_bl_noblacklisted(self):
-- 
2.17.2


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

* Re: [dts] [PATCH V1] tests/TestSuite_blacklist:Modify the verification method of blacklist equipment
  2020-05-14  2:56 [dts] [PATCH V1] tests/TestSuite_blacklist:Modify the verification method of blacklist equipment xizhan4x
@ 2020-05-14  3:03 ` Zhang, XiX
  2020-05-19  1:57 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, XiX @ 2020-05-14  3:03 UTC (permalink / raw)
  To: dts

[-- Attachment #1: Type: text/plain, Size: 3191 bytes --]

Tested-by:xix.zhang@intel.com

-----Original Message-----
From: Zhang, XiX 
Sent: Thursday, May 14, 2020 10:57 AM
To: dts@dpdk.org
Cc: Zhang, XiX <xix.zhang@intel.com>
Subject: [dts][PATCH V1] tests/TestSuite_blacklist:Modify the verification method of blacklist equipment



Echo changes after testpmd starts,Modify the verification method of blacklist equipment

Signed-off-by: xizhan4x <xix.zhang@intel.com>
---
 tests/TestSuite_blacklist.py | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py index eb56759..64360bb 100644
--- a/tests/TestSuite_blacklist.py
+++ b/tests/TestSuite_blacklist.py
@@ -36,6 +36,7 @@ Test device blacklisting.
 import utils
 from test_case import TestCase
 from pmd_output import PmdOutput
+from settings import DRIVERS
 
 class TestBlackList(TestCase):
     def set_up_all(self):
@@ -48,11 +49,7 @@ class TestBlackList(TestCase):
         self.ports = self.dut.get_ports(self.nic)
         self.verify(len(self.ports) >= 2, "Insufficient ports for testing")
         [arch, machine, self.env, toolchain] = self.target.split('-')
-
-        if self.env == 'bsdapp':
-            self.regexp_blacklisted_port = "EAL: PCI device 0000:%02x:%s on NUMA socket [-0-9]+[^\n]*\nEAL:   Device is blacklisted, not initializing"
-        else:
-            self.regexp_blacklisted_port = "EAL: PCI device %s on NUMA socket [-0-9]+[^\n]*\nEAL:   Device is blacklisted, not initializing"
+        self.regexp_blacklisted_port = "Probe PCI driver: net_%s \(%s\) device: %s \(socket [-0-9]+\)"
         self.pmdout = PmdOutput(self.dut)
 
     def set_up(self):
@@ -73,17 +70,18 @@ class TestBlackList(TestCase):
             # Look for the PCI ID of each card followed by
             # "Device is blacklisted, not initializing" but avoid to consume more
             # than one device.
-            if self.env == 'bsdapp':
-                pci = self.dut.ports_info[port]['pci']
-                regexp_blacklisted_port = self.regexp_blacklisted_port % (int(pci.split(':')[0], 16), pci.split(':')[1])
-            else:
-                regexp_blacklisted_port = self.regexp_blacklisted_port % self.dut.ports_info[port]['pci']
+            port_pci = self.dut.ports_info[port]['pci']
+            if self.env == "bsdapp":
+                port_pci = ':'.join(["0000", port_pci])
+            regexp_blacklisted_port = self.regexp_blacklisted_port % (
+                DRIVERS.get(self.nic), self.dut.ports_info[port]['type'],
+                port_pci)
             matching_ports = utils.regexp(output, regexp_blacklisted_port, True)
             if blacklisted:
-                self.verify(len(matching_ports) == 1,
+                self.verify(len(matching_ports) == 0,
                             "Blacklisted port is being initialized")
             else:
-                self.verify(len(matching_ports) == 0,
+                self.verify(len(matching_ports) == 1,
                             "Not blacklisted port is being blacklisted")
 
     def test_bl_noblacklisted(self):
--
2.17.2


[-- Attachment #2: TestBlackList.log --]
[-- Type: application/octet-stream, Size: 44857 bytes --]

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

* Re: [dts] [PATCH V1] tests/TestSuite_blacklist:Modify the verification method of blacklist equipment
  2020-05-14  2:56 [dts] [PATCH V1] tests/TestSuite_blacklist:Modify the verification method of blacklist equipment xizhan4x
  2020-05-14  3:03 ` Zhang, XiX
@ 2020-05-19  1:57 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-05-19  1:57 UTC (permalink / raw)
  To: Zhang, XiX, dts; +Cc: Zhang, XiX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xizhan4x
> Sent: Thursday, May 14, 2020 10:57 AM
> To: dts@dpdk.org
> Cc: Zhang, XiX <xix.zhang@intel.com>
> Subject: [dts] [PATCH V1] tests/TestSuite_blacklist:Modify the verification
> method of blacklist equipment
> 
> 
> 
> Echo changes after testpmd starts,Modify the verification method of blacklist
> equipment
> 
> Signed-off-by: xizhan4x <xix.zhang@intel.com>
> ---
>  tests/TestSuite_blacklist.py | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py index
> eb56759..64360bb 100644
> --- a/tests/TestSuite_blacklist.py
> +++ b/tests/TestSuite_blacklist.py
> @@ -36,6 +36,7 @@ Test device blacklisting.
>  import utils
>  from test_case import TestCase
>  from pmd_output import PmdOutput
> +from settings import DRIVERS
> 
>  class TestBlackList(TestCase):
>      def set_up_all(self):
> @@ -48,11 +49,7 @@ class TestBlackList(TestCase):
>          self.ports = self.dut.get_ports(self.nic)
>          self.verify(len(self.ports) >= 2, "Insufficient ports for testing")
>          [arch, machine, self.env, toolchain] = self.target.split('-')
> -
> -        if self.env == 'bsdapp':
> -            self.regexp_blacklisted_port = "EAL: PCI device 0000:%02x:%s on
> NUMA socket [-0-9]+[^\n]*\nEAL:   Device is blacklisted, not initializing"
> -        else:
> -            self.regexp_blacklisted_port = "EAL: PCI device %s on NUMA socket [-
> 0-9]+[^\n]*\nEAL:   Device is blacklisted, not initializing"
> +        self.regexp_blacklisted_port = "Probe PCI driver: net_%s \(%s\)
> device: %s \(socket [-0-9]+\)"
>          self.pmdout = PmdOutput(self.dut)
> 
>      def set_up(self):
> @@ -73,17 +70,18 @@ class TestBlackList(TestCase):
>              # Look for the PCI ID of each card followed by
>              # "Device is blacklisted, not initializing" but avoid to consume more
>              # than one device.
> -            if self.env == 'bsdapp':
> -                pci = self.dut.ports_info[port]['pci']
> -                regexp_blacklisted_port = self.regexp_blacklisted_port %
> (int(pci.split(':')[0], 16), pci.split(':')[1])
> -            else:
> -                regexp_blacklisted_port = self.regexp_blacklisted_port %
> self.dut.ports_info[port]['pci']
> +            port_pci = self.dut.ports_info[port]['pci']
> +            if self.env == "bsdapp":
> +                port_pci = ':'.join(["0000", port_pci])
> +            regexp_blacklisted_port = self.regexp_blacklisted_port % (
> +                DRIVERS.get(self.nic), self.dut.ports_info[port]['type'],
> +                port_pci)
>              matching_ports = utils.regexp(output, regexp_blacklisted_port, True)
>              if blacklisted:
> -                self.verify(len(matching_ports) == 1,
> +                self.verify(len(matching_ports) == 0,
>                              "Blacklisted port is being initialized")
>              else:
> -                self.verify(len(matching_ports) == 0,
> +                self.verify(len(matching_ports) == 1,
>                              "Not blacklisted port is being blacklisted")
> 
>      def test_bl_noblacklisted(self):
> --
> 2.17.2


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14  2:56 [dts] [PATCH V1] tests/TestSuite_blacklist:Modify the verification method of blacklist equipment xizhan4x
2020-05-14  3:03 ` Zhang, XiX
2020-05-19  1:57 ` 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