test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts]  add rss hash key size case
@ 2015-07-13  5:43 huilongx,xu
  2015-07-13  5:51 ` Liu, Yong
  0 siblings, 1 reply; 3+ messages in thread
From: huilongx,xu @ 2015-07-13  5:43 UTC (permalink / raw)
  To: dts

From: huilong xu <huilongx.xu@intel.com>


Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
 tests/TestSuite_pmdrssreta.py |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
index 60f340d..1749889 100644
--- a/tests/TestSuite_pmdrssreta.py
+++ b/tests/TestSuite_pmdrssreta.py
@@ -241,6 +241,30 @@ class TestPmdrssreta(TestCase):
                 self.send_packet(itf, iptype)
 
             self.dut.send_expect("quit", "# ", 30)
+    def test_rss_key_size(self):
+        nic_rss_key_size = {"fortville_eagle":52, "fortville_spirit":52, "fortville_spirit_single":52, "niantic": 40, "e1000": 40}
+        dutPorts = self.dut.get_ports(self.nic)
+        localPort = self.tester.get_local_port(dutPorts[0])
+        itf = self.tester.get_interface(localPort)
+        self.dut.kill_all()
+        self.dut.send_expect("./%s/app/testpmd  -c fffff -n %d -- -i --coremask=0xffffe --rxq=2 --txq=2" % (self.target, self.dut.get_memory_channels()), "testpmd> ", 120)
+        self.dut.send_expect("start", "testpmd> ", 120)
+        out = self.dut.send_expect("show port info all", "testpmd> ", 120)
+        self.dut.send_expect("quit", "# ", 30)
+        print out
+
+        pattern = re.compile("Hash key size in bytes:\s(\d+)")
+        m = pattern.search(out)
+        if m is not None:
+            size = m.group(1)
+            print "******************"
+            print size
+            print self.nic
+            print nic_rss_key_size[self.nic]
+            if (nic_rss_key_size[self.nic] == int(size)):
+                self.verify(True, "pass")
+            else:
+                self.verify(False, "fail")
 
     def tear_down(self):
         """
-- 
1.7.4.4

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

* Re: [dts] add rss hash key size case
  2015-07-13  5:43 [dts] add rss hash key size case huilongx,xu
@ 2015-07-13  5:51 ` Liu, Yong
  2015-07-13  6:17   ` Xu, HuilongX
  0 siblings, 1 reply; 3+ messages in thread
From: Liu, Yong @ 2015-07-13  5:51 UTC (permalink / raw)
  To: Xu, HuilongX, dts

Huilong,
There should be one new line before function test_rss_key_size. And one comment about log message.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx,xu
> Sent: Monday, July 13, 2015 1:43 PM
> To: dts@dpdk.org
> Subject: [dts] add rss hash key size case
> 
> From: huilong xu <huilongx.xu@intel.com>
> 
> 
> Signed-off-by: huilong xu <huilongx.xu@intel.com>
> ---
>  tests/TestSuite_pmdrssreta.py |   24 ++++++++++++++++++++++++
>  1 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
> index 60f340d..1749889 100644
> --- a/tests/TestSuite_pmdrssreta.py
> +++ b/tests/TestSuite_pmdrssreta.py
> @@ -241,6 +241,30 @@ class TestPmdrssreta(TestCase):
>                  self.send_packet(itf, iptype)
> 
>              self.dut.send_expect("quit", "# ", 30)
> +    def test_rss_key_size(self):
> +        nic_rss_key_size = {"fortville_eagle":52, "fortville_spirit":52,
> "fortville_spirit_single":52, "niantic": 40, "e1000": 40}
> +        dutPorts = self.dut.get_ports(self.nic)
> +        localPort = self.tester.get_local_port(dutPorts[0])
> +        itf = self.tester.get_interface(localPort)
> +        self.dut.kill_all()
> +        self.dut.send_expect("./%s/app/testpmd  -c fffff -n %d -- -i --
> coremask=0xffffe --rxq=2 --txq=2" % (self.target,
> self.dut.get_memory_channels()), "testpmd> ", 120)
> +        self.dut.send_expect("start", "testpmd> ", 120)
> +        out = self.dut.send_expect("show port info all", "testpmd> ", 120)
> +        self.dut.send_expect("quit", "# ", 30)
> +        print out
> +
> +        pattern = re.compile("Hash key size in bytes:\s(\d+)")
> +        m = pattern.search(out)
> +        if m is not None:
> +            size = m.group(1)
> +            print "******************"
> +            print size
> +            print self.nic

Can you optimize this simple print to more meaningful sentence, like "Niantic Rss size should be 40 and testpmd reported 40".

> +            print nic_rss_key_size[self.nic]
> +            if (nic_rss_key_size[self.nic] == int(size)):
> +                self.verify(True, "pass")
> +            else:
> +                self.verify(False, "fail")
> 
>      def tear_down(self):
>          """
> --
> 1.7.4.4

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

* Re: [dts] add rss hash key size case
  2015-07-13  5:51 ` Liu, Yong
@ 2015-07-13  6:17   ` Xu, HuilongX
  0 siblings, 0 replies; 3+ messages in thread
From: Xu, HuilongX @ 2015-07-13  6:17 UTC (permalink / raw)
  To: Liu, Yong, dts

Ok,I will send V2 patch for your comments thanks  a lot

> -----Original Message-----
> From: Liu, Yong
> Sent: Monday, July 13, 2015 1:51 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: RE: [dts] add rss hash key size case
> 
> Huilong,
> There should be one new line before function test_rss_key_size. And one
> comment about log message.
> 
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx,xu
> > Sent: Monday, July 13, 2015 1:43 PM
> > To: dts@dpdk.org
> > Subject: [dts] add rss hash key size case
> >
> > From: huilong xu <huilongx.xu@intel.com>
> >
> >
> > Signed-off-by: huilong xu <huilongx.xu@intel.com>
> > ---
> >  tests/TestSuite_pmdrssreta.py |   24 ++++++++++++++++++++++++
> >  1 files changed, 24 insertions(+), 0 deletions(-)
> >
> > diff --git a/tests/TestSuite_pmdrssreta.py
> b/tests/TestSuite_pmdrssreta.py
> > index 60f340d..1749889 100644
> > --- a/tests/TestSuite_pmdrssreta.py
> > +++ b/tests/TestSuite_pmdrssreta.py
> > @@ -241,6 +241,30 @@ class TestPmdrssreta(TestCase):
> >                  self.send_packet(itf, iptype)
> >
> >              self.dut.send_expect("quit", "# ", 30)
> > +    def test_rss_key_size(self):
> > +        nic_rss_key_size = {"fortville_eagle":52, "fortville_spirit":52,
> > "fortville_spirit_single":52, "niantic": 40, "e1000": 40}
> > +        dutPorts = self.dut.get_ports(self.nic)
> > +        localPort = self.tester.get_local_port(dutPorts[0])
> > +        itf = self.tester.get_interface(localPort)
> > +        self.dut.kill_all()
> > +        self.dut.send_expect("./%s/app/testpmd  -c fffff -n %d -- -i --
> > coremask=0xffffe --rxq=2 --txq=2" % (self.target,
> > self.dut.get_memory_channels()), "testpmd> ", 120)
> > +        self.dut.send_expect("start", "testpmd> ", 120)
> > +        out = self.dut.send_expect("show port info all", "testpmd> ",
> 120)
> > +        self.dut.send_expect("quit", "# ", 30)
> > +        print out
> > +
> > +        pattern = re.compile("Hash key size in bytes:\s(\d+)")
> > +        m = pattern.search(out)
> > +        if m is not None:
> > +            size = m.group(1)
> > +            print "******************"
> > +            print size
> > +            print self.nic
> 
> Can you optimize this simple print to more meaningful sentence, like
> "Niantic Rss size should be 40 and testpmd reported 40".
> 
> > +            print nic_rss_key_size[self.nic]
> > +            if (nic_rss_key_size[self.nic] == int(size)):
> > +                self.verify(True, "pass")
> > +            else:
> > +                self.verify(False, "fail")
> >
> >      def tear_down(self):
> >          """
> > --
> > 1.7.4.4


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

end of thread, other threads:[~2015-07-13  6:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13  5:43 [dts] add rss hash key size case huilongx,xu
2015-07-13  5:51 ` Liu, Yong
2015-07-13  6:17   ` Xu, HuilongX

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).