* [dts] [PATCH] blacklist suite: fix cases for framework update
@ 2015-05-21 6:58 Jingguo Fu
0 siblings, 0 replies; 3+ messages in thread
From: Jingguo Fu @ 2015-05-21 6:58 UTC (permalink / raw)
To: dts; +Cc: jingguox.fu
Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
---
tests/TestSuite_blacklist.py | 29 +++++------------------------
1 file changed, 5 insertions(+), 24 deletions(-)
diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py
index 8e9debd..04425ba 100644
--- a/tests/TestSuite_blacklist.py
+++ b/tests/TestSuite_blacklist.py
@@ -31,29 +31,20 @@
"""
DPDK Test suite.
-
Test device blacklisting.
-
"""
-
import dts
-
-
from test_case import TestCase
from pmd_output import PmdOutput
-
-class TestBlacklist(TestCase):
-
+class TestBlackList(TestCase):
def set_up_all(self):
"""
Run at the start of each test suite.
-
Blacklist Prerequisites.
Requirements:
Two Ports
"""
-
self.ports = self.dut.get_ports()
self.verify(len(self.ports) >= 2, "Insufficient ports for testing")
[arch, machine, self.env, toolchain] = self.target.split('-')
@@ -87,9 +78,7 @@ class TestBlacklist(TestCase):
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']
-
matching_ports = dts.regexp(output, regexp_blacklisted_port, True)
-
if blacklisted:
self.verify(len(matching_ports) == 1,
"Blacklisted port is being initialized")
@@ -101,7 +90,7 @@ class TestBlacklist(TestCase):
"""
Run testpmd with no blacklisted device.
"""
- out = self.pmdout.start_testpmd("all")
+ out = self.pmdout.start_testpmd("Default")
rexp = r"Link"
match_status = dts.regexp(out, rexp, True)
@@ -112,9 +101,7 @@ class TestBlacklist(TestCase):
Run testpmd with one port blacklisted.
"""
self.dut.kill_all()
-
- out = self.pmdout.start_testpmd("all", eal_param="-b 0000:%s -- -i" % self.dut.ports_info[0]['pci'])
-
+ out = self.pmdout.start_testpmd("Default", eal_param="-b 0000:%s -- -i" % self.dut.ports_info[0]['pci'])
self.check_blacklisted_ports(out, self.ports[1:])
def test_bl_allbutoneportblacklisted(self):
@@ -122,18 +109,13 @@ class TestBlacklist(TestCase):
Run testpmd with all but one port blacklisted.
"""
self.dut.kill_all()
-
ports_to_blacklist = self.ports[:-1]
-
cmdline = ""
for port in ports_to_blacklist:
cmdline += " -b 0000:%s" % self.dut.ports_info[port]['pci']
-
- out = self.pmdout.start_testpmd("all", eal_param=cmdline)
-
+ out = self.pmdout.start_testpmd("Default", eal_param=cmdline)
blacklisted_ports = self.check_blacklisted_ports(out,
- ports_to_blacklist,
- True)
+ ports_to_blacklist, True)
def tear_down(self):
"""
@@ -141,7 +123,6 @@ class TestBlacklist(TestCase):
Quit testpmd.
"""
self.dut.send_expect("quit", "# ", 10)
-
def tear_down_all(self):
"""
Run after each test suite.
--
2.1.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH] blacklist suite: fix cases for framework update
2015-05-21 8:33 ` Tang, HaifengX
@ 2015-05-21 8:55 ` Liu, Yong
0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2015-05-21 8:55 UTC (permalink / raw)
To: Tang, HaifengX, dts; +Cc: Fu, JingguoX
Applied. Thx.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Tang, HaifengX
> Sent: Thursday, May 21, 2015 4:34 PM
> To: dts@dpdk.org
> Cc: Fu, JingguoX
> Subject: Re: [dts] [PATCH] blacklist suite: fix cases for framework update
>
> >
> >
> >-----Original Message-----
> >From: Fu, JingguoX
> >Sent: Thursday, May 21, 2015 3:31 PM
> >Cc: Tang, HaifengX; Fu, JingguoX
> >Subject: [PATCH] blacklist suite: fix cases for framework update
> >
> >Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
> >---
> > tests/TestSuite_blacklist.py | 29 +++++------------------------
> > 1 file changed, 5 insertions(+), 24 deletions(-)
> >
> >diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py
> index 8e9debd..04425ba 100644
> >--- a/tests/TestSuite_blacklist.py
> >+++ b/tests/TestSuite_blacklist.py
> >@@ -31,29 +31,20 @@
> >
> > """
> > DPDK Test suite.
> >-
> > Test device blacklisting.
> >-
> > """
> >-
> > import dts
> >-
> >-
> > from test_case import TestCase
> > from pmd_output import PmdOutput
> >
> >-
> >-class TestBlacklist(TestCase):
> >-
> >+class TestBlackList(TestCase):
> > def set_up_all(self):
> > """
> > Run at the start of each test suite.
> >-
> > Blacklist Prerequisites.
> > Requirements:
> > Two Ports
> > """
> >-
> > self.ports = self.dut.get_ports()
> > self.verify(len(self.ports) >= 2, "Insufficient ports for
> testing")
> > [arch, machine, self.env, toolchain] = self.target.split('-') @@
> -87,9 +78,7 @@ class TestBlacklist(TestCase):
> > 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']
> >-
> > matching_ports = dts.regexp(output, regexp_blacklisted_port,
> True)
> >-
> > if blacklisted:
> > self.verify(len(matching_ports) == 1,
> > "Blacklisted port is being initialized") @@
> -101,7 +90,7 @@ class TestBlacklist(TestCase):
> > """
> > Run testpmd with no blacklisted device.
> > """
> >- out = self.pmdout.start_testpmd("all")
> >+ out = self.pmdout.start_testpmd("Default")
> > rexp = r"Link"
> > match_status = dts.regexp(out, rexp, True)
> >
> >@@ -112,9 +101,7 @@ class TestBlacklist(TestCase):
> > Run testpmd with one port blacklisted.
> > """
> > self.dut.kill_all()
> >-
> >- out = self.pmdout.start_testpmd("all", eal_param="-b 0000:%s --
> -i" % self.dut.ports_info[0]['pci'])
> >-
> >+ out = self.pmdout.start_testpmd("Default", eal_param="-b
> >+ 0000:%s -- -i" % self.dut.ports_info[0]['pci'])
> > self.check_blacklisted_ports(out, self.ports[1:])
> >
> > def test_bl_allbutoneportblacklisted(self):
> >@@ -122,18 +109,13 @@ class TestBlacklist(TestCase):
> > Run testpmd with all but one port blacklisted.
> > """
> > self.dut.kill_all()
> >-
> > ports_to_blacklist = self.ports[:-1]
> >-
> > cmdline = ""
> > for port in ports_to_blacklist:
> > cmdline += " -b 0000:%s" % self.dut.ports_info[port]['pci']
> >-
> >- out = self.pmdout.start_testpmd("all", eal_param=cmdline)
> >-
> >+ out = self.pmdout.start_testpmd("Default", eal_param=cmdline)
> > blacklisted_ports = self.check_blacklisted_ports(out,
> >-
> ports_to_blacklist,
> >- True)
> >+ ports_to_blacklist, True)
> >
> > def tear_down(self):
> > """
> >@@ -141,7 +123,6 @@ class TestBlacklist(TestCase):
> > Quit testpmd.
> > """
> > self.dut.send_expect("quit", "# ", 10)
> >-
> > def tear_down_all(self):
> > """
> > Run after each test suite.
> >--
> >2.1.0
> >
> >
> Acked-by: Haifeng Tang <haifengx.tang@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH] blacklist suite: fix cases for framework update
[not found] <1432193456-11681-1-git-send-email-jingguox.fu@intel.com>
@ 2015-05-21 8:33 ` Tang, HaifengX
2015-05-21 8:55 ` Liu, Yong
0 siblings, 1 reply; 3+ messages in thread
From: Tang, HaifengX @ 2015-05-21 8:33 UTC (permalink / raw)
To: dts; +Cc: Fu, JingguoX
>
>
>-----Original Message-----
>From: Fu, JingguoX
>Sent: Thursday, May 21, 2015 3:31 PM
>Cc: Tang, HaifengX; Fu, JingguoX
>Subject: [PATCH] blacklist suite: fix cases for framework update
>
>Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
>---
> tests/TestSuite_blacklist.py | 29 +++++------------------------
> 1 file changed, 5 insertions(+), 24 deletions(-)
>
>diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blacklist.py index 8e9debd..04425ba 100644
>--- a/tests/TestSuite_blacklist.py
>+++ b/tests/TestSuite_blacklist.py
>@@ -31,29 +31,20 @@
>
> """
> DPDK Test suite.
>-
> Test device blacklisting.
>-
> """
>-
> import dts
>-
>-
> from test_case import TestCase
> from pmd_output import PmdOutput
>
>-
>-class TestBlacklist(TestCase):
>-
>+class TestBlackList(TestCase):
> def set_up_all(self):
> """
> Run at the start of each test suite.
>-
> Blacklist Prerequisites.
> Requirements:
> Two Ports
> """
>-
> self.ports = self.dut.get_ports()
> self.verify(len(self.ports) >= 2, "Insufficient ports for testing")
> [arch, machine, self.env, toolchain] = self.target.split('-') @@ -87,9 +78,7 @@ class TestBlacklist(TestCase):
> 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']
>-
> matching_ports = dts.regexp(output, regexp_blacklisted_port, True)
>-
> if blacklisted:
> self.verify(len(matching_ports) == 1,
> "Blacklisted port is being initialized") @@ -101,7 +90,7 @@ class TestBlacklist(TestCase):
> """
> Run testpmd with no blacklisted device.
> """
>- out = self.pmdout.start_testpmd("all")
>+ out = self.pmdout.start_testpmd("Default")
> rexp = r"Link"
> match_status = dts.regexp(out, rexp, True)
>
>@@ -112,9 +101,7 @@ class TestBlacklist(TestCase):
> Run testpmd with one port blacklisted.
> """
> self.dut.kill_all()
>-
>- out = self.pmdout.start_testpmd("all", eal_param="-b 0000:%s -- -i" % self.dut.ports_info[0]['pci'])
>-
>+ out = self.pmdout.start_testpmd("Default", eal_param="-b
>+ 0000:%s -- -i" % self.dut.ports_info[0]['pci'])
> self.check_blacklisted_ports(out, self.ports[1:])
>
> def test_bl_allbutoneportblacklisted(self):
>@@ -122,18 +109,13 @@ class TestBlacklist(TestCase):
> Run testpmd with all but one port blacklisted.
> """
> self.dut.kill_all()
>-
> ports_to_blacklist = self.ports[:-1]
>-
> cmdline = ""
> for port in ports_to_blacklist:
> cmdline += " -b 0000:%s" % self.dut.ports_info[port]['pci']
>-
>- out = self.pmdout.start_testpmd("all", eal_param=cmdline)
>-
>+ out = self.pmdout.start_testpmd("Default", eal_param=cmdline)
> blacklisted_ports = self.check_blacklisted_ports(out,
>- ports_to_blacklist,
>- True)
>+ ports_to_blacklist, True)
>
> def tear_down(self):
> """
>@@ -141,7 +123,6 @@ class TestBlacklist(TestCase):
> Quit testpmd.
> """
> self.dut.send_expect("quit", "# ", 10)
>-
> def tear_down_all(self):
> """
> Run after each test suite.
>--
>2.1.0
>
>
Acked-by: Haifeng Tang <haifengx.tang@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-21 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21 6:58 [dts] [PATCH] blacklist suite: fix cases for framework update Jingguo Fu
[not found] <1432193456-11681-1-git-send-email-jingguox.fu@intel.com>
2015-05-21 8:33 ` Tang, HaifengX
2015-05-21 8:55 ` Liu, Yong
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).