test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests: Correct some format errors
@ 2019-01-11  8:34 Peng Yuan
  2019-01-15  6:10 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Yuan @ 2019-01-11  8:34 UTC (permalink / raw)
  To: dts; +Cc: Peng Yuan

Correct some format errors for TestSuite_jumboframes.py

Signed-off-by: Peng Yuan <yuan.peng@intel.com>

diff --git a/tests/TestSuite_jumboframes.py b/tests/TestSuite_jumboframes.py
index b3d53d8..cbb284d 100644
--- a/tests/TestSuite_jumboframes.py
+++ b/tests/TestSuite_jumboframes.py
@@ -84,7 +84,6 @@ class TestJumboframes(TestCase):
         sleep(5)
 
         tx_pkts, _, tx_bytes = [int(_) for _ in self.jumboframes_get_stat(self.rx_port, "tx")]
-        # p0tx_pkts, p0tx_err, p0tx_bytes
         rx_pkts, rx_err, rx_bytes = [int(_) for _ in self.jumboframes_get_stat(self.tx_port, "rx")]
 
         tx_pkts -= tx_pkts_ori
@@ -99,7 +98,6 @@ class TestJumboframes(TestCase):
                          and ((rx_bytes + 4) == pktsize),
                         "packet pass assert error")
         else:
-            #self.verify(p0tx_pkts == p1rx_pkts and (p1rx_err == 1 or p1rx_pkts == 0),
             self.verify(rx_err == 1 or tx_pkts == 0, "packet drop assert error")
         return out
 
@@ -129,7 +127,6 @@ class TestJumboframes(TestCase):
             netobj.enable_jumbo(framesize = ETHER_JUMBO_FRAME_MTU)
 
         self.tester.send_expect("ifconfig %s mtu %s" % (self.tester.get_interface(self.tester.get_local_port(self.rx_port)), ETHER_JUMBO_FRAME_MTU + 200), "# ")
-#        self.tester.send_expect("ifconfig %s mtu %s" % (self.tester.get_interface(self.tester.get_local_port(self.tx_port)), ETHER_JUMBO_FRAME_MTU + 200), "# ")
 
         self.pmdout = PmdOutput(self.dut)
 
@@ -181,8 +178,8 @@ class TestJumboframes(TestCase):
         self.dut.send_expect("set fwd mac", "testpmd> ")
         self.dut.send_expect("start", "testpmd> ")
 
-        self.jumboframes_send_packet(1517)
-        self.jumboframes_send_packet(1518)
+        self.jumboframes_send_packet(ETHER_STANDARD_MTU - 1)
+        self.jumboframes_send_packet(ETHER_STANDARD_MTU)
 
         self.dut.send_expect("stop", "testpmd> ")
         self.dut.send_expect("quit", "# ", 30)
@@ -234,4 +231,3 @@ class TestJumboframes(TestCase):
         clear up.
         """
         self.tester.send_expect("ifconfig %s mtu %s" % (self.tester.get_interface(self.tester.get_local_port(self.rx_port)), ETHER_STANDARD_MTU), "# ")
-        self.tester.send_expect("ifconfig %s mtu %s" % (self.tester.get_interface(self.tester.get_local_port(self.tx_port)), ETHER_STANDARD_MTU), "# ")
-- 
2.5.0

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

* Re: [dts] [PATCH] tests: Correct some format errors
  2019-01-11  8:34 [dts] [PATCH] tests: Correct some format errors Peng Yuan
@ 2019-01-15  6:10 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-01-15  6:10 UTC (permalink / raw)
  To: Peng, Yuan, dts; +Cc: Peng, Yuan

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Yuan
> Sent: Friday, January 11, 2019 4:35 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>
> Subject: [dts] [PATCH] tests: Correct some format errors
> 
> Correct some format errors for TestSuite_jumboframes.py
> 
> Signed-off-by: Peng Yuan <yuan.peng@intel.com>
> 
> diff --git a/tests/TestSuite_jumboframes.py b/tests/TestSuite_jumboframes.py
> index b3d53d8..cbb284d 100644
> --- a/tests/TestSuite_jumboframes.py
> +++ b/tests/TestSuite_jumboframes.py
> @@ -84,7 +84,6 @@ class TestJumboframes(TestCase):
>          sleep(5)
> 
>          tx_pkts, _, tx_bytes = [int(_) for _ in self.jumboframes_get_stat(self.rx_port,
> "tx")]
> -        # p0tx_pkts, p0tx_err, p0tx_bytes
>          rx_pkts, rx_err, rx_bytes = [int(_) for _ in
> self.jumboframes_get_stat(self.tx_port, "rx")]
> 
>          tx_pkts -= tx_pkts_ori
> @@ -99,7 +98,6 @@ class TestJumboframes(TestCase):
>                           and ((rx_bytes + 4) == pktsize),
>                          "packet pass assert error")
>          else:
> -            #self.verify(p0tx_pkts == p1rx_pkts and (p1rx_err == 1 or p1rx_pkts == 0),
>              self.verify(rx_err == 1 or tx_pkts == 0, "packet drop assert error")
>          return out
> 
> @@ -129,7 +127,6 @@ class TestJumboframes(TestCase):
>              netobj.enable_jumbo(framesize = ETHER_JUMBO_FRAME_MTU)
> 
>          self.tester.send_expect("ifconfig %s mtu %s" %
> (self.tester.get_interface(self.tester.get_local_port(self.rx_port)),
> ETHER_JUMBO_FRAME_MTU + 200), "# ")
> -#        self.tester.send_expect("ifconfig %s mtu %s" %
> (self.tester.get_interface(self.tester.get_local_port(self.tx_port)),
> ETHER_JUMBO_FRAME_MTU + 200), "# ")
> 
>          self.pmdout = PmdOutput(self.dut)
> 
> @@ -181,8 +178,8 @@ class TestJumboframes(TestCase):
>          self.dut.send_expect("set fwd mac", "testpmd> ")
>          self.dut.send_expect("start", "testpmd> ")
> 
> -        self.jumboframes_send_packet(1517)
> -        self.jumboframes_send_packet(1518)
> +        self.jumboframes_send_packet(ETHER_STANDARD_MTU - 1)
> +        self.jumboframes_send_packet(ETHER_STANDARD_MTU)
> 
>          self.dut.send_expect("stop", "testpmd> ")
>          self.dut.send_expect("quit", "# ", 30) @@ -234,4 +231,3 @@ class
> TestJumboframes(TestCase):
>          clear up.
>          """
>          self.tester.send_expect("ifconfig %s mtu %s" %
> (self.tester.get_interface(self.tester.get_local_port(self.rx_port)),
> ETHER_STANDARD_MTU), "# ")
> -        self.tester.send_expect("ifconfig %s mtu %s" %
> (self.tester.get_interface(self.tester.get_local_port(self.tx_port)),
> ETHER_STANDARD_MTU), "# ")
> --
> 2.5.0

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

end of thread, other threads:[~2019-01-15  6:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11  8:34 [dts] [PATCH] tests: Correct some format errors Peng Yuan
2019-01-15  6:10 ` Tu, Lijuan

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