test suite reviews and discussions
 help / color / mirror / Atom feed
* Re: [dts] [PATCH V1] tests/tso: should stop ports before set csum
  2019-05-17  1:28 [dts] [PATCH V1] tests/tso: should stop ports before set csum Wenjie Li
@ 2019-05-17  1:26 ` Li, WenjieX A
  2019-05-17  1:26 ` Li, WenjieX A
  2019-05-22  5:54 ` Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: Li, WenjieX A @ 2019-05-17  1:26 UTC (permalink / raw)
  To: dts; +Cc: Zhang, YanX A

Tested-by: Zhang, YanX A <yanx.a.zhang@intel.com>

> -----Original Message-----
> From: Li, WenjieX A
> Sent: Friday, May 17, 2019 9:29 AM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts][PATCH V1] tests/tso: should stop ports before set csum
> 
> 1. should stop ports before set csum and start ports after the settings 2. there is
> no clear indication of which network card is not supported, will not check the nic
> type anymore 3. add tear_down and tear_down_all 4. delete unless
> comment/code
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
>  tests/TestSuite_tso.py | 33 ++++++++++++++++++---------------
>  1 file changed, 18 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py index
> 6735169..5e0dbd5 100644
> --- a/tests/TestSuite_tso.py
> +++ b/tests/TestSuite_tso.py
> @@ -51,13 +51,6 @@ class TestTSO(TestCase):
>          """
>          Run at the start of each test suite.
>          """
> -        # this feature support Fortville, Niantic
> -        self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM",
> -                                 "82540EM", "springfountain", "fortville_eagle",
> -                                 "fortville_spirit", "fortville_spirit_single",
> -                                 "redrockcanyou", "atwood", "boulderrapid",
> "fortpark_TLV","fortville_25g","hi1822", "cavium_a063"],
> -                    "NIC Unsupported: " + str(self.nic))
> -
>          # Based on h/w type, choose how many ports to use
>          self.dut_ports = self.dut.get_ports(self.nic)
> 
> @@ -72,12 +65,6 @@ class TestTSO(TestCase):
>          self.frame_sizes = [128, 1458]
>          self.rxfreet_values = [0, 8, 16, 32, 64, 128]
> 
> -        # self.test_cycles = [{'cores': '1S/1C/1T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/2C/1T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/2C/2T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/4C/2T', 'Mpps': {}, 'pct': {}}
> -        #                     ]
>          self.test_cycles = [{'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {}}]
> 
>          self.table_header = ['Frame Size'] @@ -87,8 +74,6 @@ class
> TestTSO(TestCase):
> 
>          self.blacklist = ""
> 
> -        # self.coreMask = utils.create_mask(cores)
> -
>          self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE[
>              'ip'] + HEADER_SIZE['tcp']
> 
> @@ -160,6 +145,7 @@ class TestTSO(TestCase):
>          cmd = "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=512 --txd=512 --
> burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --
> txwt=0 --txfreet=32 --txrst=32 " % (self.target, self.coreMask,
> self.dut.get_memory_channels(), self.blacklist, self.portMask)
>          self.dut.send_expect(cmd, "testpmd> ", 120)
>          self.dut.send_expect("set verbose 1", "testpmd> ", 120)
> +        self.dut.send_expect("port stop all", "testpmd> ", 120)
>          self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ",
> 120)
>          self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd>
> ", 120)
>          self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd>
> ", 120) @@ -176,6 +162,7 @@ class TestTSO(TestCase):
> 
>          self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ",
> 120)
>          self.dut.send_expect("set fwd csum", "testpmd> ", 120)
> +        self.dut.send_expect("port start all", "testpmd> ", 120)
>          self.dut.send_expect("start", "testpmd> ")
> 
>          self.tester.scapy_foreground()
> @@ -226,6 +213,7 @@ class TestTSO(TestCase):
>          cmd = "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=512 --txd=512 --
> burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --
> txwt=0 --txfreet=32 --txrst=32 " % (self.target, self.coreMask,
> self.dut.get_memory_channels(), self.blacklist, self.portMask)
>          self.dut.send_expect(cmd, "testpmd> ", 120)
>          self.dut.send_expect("set verbose 1", "testpmd> ", 120)
> +        self.dut.send_expect("port stop all", "testpmd> ", 120)
>          self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ",
> 120)
>          self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd>
> ", 120)
>          self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd>
> ", 120) @@ -242,6 +230,7 @@ class TestTSO(TestCase):
> 
>          self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ",
> 120)
>          self.dut.send_expect("set fwd csum", "testpmd> ", 120)
> +        self.dut.send_expect("port start all", "testpmd> ", 120)
>          self.dut.send_expect("start", "testpmd> ")
> 
>          self.tester.scapy_foreground()
> @@ -295,6 +284,7 @@ class TestTSO(TestCase):
>              self.rst_report(command_line + "\n\n", frame=True, annex=True)
> 
>              self.dut.send_expect(command_line, "testpmd> ", 120)
> +            self.dut.send_expect("port stop all", "testpmd> ", 120)
>              self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd>
> ", 120)
>              self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0],
> "testpmd> ", 120)
>              self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd>
> ", 120) @@ -309,6 +299,7 @@ class TestTSO(TestCase):
>              self.dut.send_expect("csum parse-tunnel on %d" % self.dut_ports[1],
> "testpmd> ", 120)
>              self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ",
> 120)
>              self.dut.send_expect("set fwd csum", "testpmd> ", 120)
> +            self.dut.send_expect("port start all", "testpmd> ", 120)
>              self.dut.send_expect("start", "testpmd> ")
>              for frame_size in self.frame_sizes:
>                  wirespeed = self.wirespeed(self.nic, frame_size, 2) @@ -350,3 +341,15
> @@ class TestTSO(TestCase):
>              self.result_table_add(table_row)
> 
>          self.result_table_print()
> +    def tear_down(self):
> +        """
> +        Run after each test case.
> +        """
> +        self.dut.kill_all()
> +        time.sleep(2)
> +
> +    def tear_down_all(self):
> +        """
> +        Run after each test suite.
> +        """
> +        pass
> --
> 2.17.2


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

* Re: [dts] [PATCH V1] tests/tso: should stop ports before set csum
  2019-05-17  1:28 [dts] [PATCH V1] tests/tso: should stop ports before set csum Wenjie Li
  2019-05-17  1:26 ` Li, WenjieX A
@ 2019-05-17  1:26 ` Li, WenjieX A
  2019-05-22  5:54 ` Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: Li, WenjieX A @ 2019-05-17  1:26 UTC (permalink / raw)
  To: dts; +Cc: Li, WenjieX A

Reviewed-by: Wenjie <wenjiex.a.li@intel.com>

> -----Original Message-----
> From: Li, WenjieX A
> Sent: Friday, May 17, 2019 9:29 AM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts][PATCH V1] tests/tso: should stop ports before set csum
> 
> 1. should stop ports before set csum and start ports after the settings 2. there is
> no clear indication of which network card is not supported, will not check the nic
> type anymore 3. add tear_down and tear_down_all 4. delete unless
> comment/code
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
>  tests/TestSuite_tso.py | 33 ++++++++++++++++++---------------
>  1 file changed, 18 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py index
> 6735169..5e0dbd5 100644
> --- a/tests/TestSuite_tso.py
> +++ b/tests/TestSuite_tso.py
> @@ -51,13 +51,6 @@ class TestTSO(TestCase):
>          """
>          Run at the start of each test suite.
>          """
> -        # this feature support Fortville, Niantic
> -        self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM",
> -                                 "82540EM", "springfountain", "fortville_eagle",
> -                                 "fortville_spirit", "fortville_spirit_single",
> -                                 "redrockcanyou", "atwood", "boulderrapid",
> "fortpark_TLV","fortville_25g","hi1822", "cavium_a063"],
> -                    "NIC Unsupported: " + str(self.nic))
> -
>          # Based on h/w type, choose how many ports to use
>          self.dut_ports = self.dut.get_ports(self.nic)
> 
> @@ -72,12 +65,6 @@ class TestTSO(TestCase):
>          self.frame_sizes = [128, 1458]
>          self.rxfreet_values = [0, 8, 16, 32, 64, 128]
> 
> -        # self.test_cycles = [{'cores': '1S/1C/1T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/2C/1T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/2C/2T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/4C/2T', 'Mpps': {}, 'pct': {}}
> -        #                     ]
>          self.test_cycles = [{'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {}}]
> 
>          self.table_header = ['Frame Size'] @@ -87,8 +74,6 @@ class
> TestTSO(TestCase):
> 
>          self.blacklist = ""
> 
> -        # self.coreMask = utils.create_mask(cores)
> -
>          self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE[
>              'ip'] + HEADER_SIZE['tcp']
> 
> @@ -160,6 +145,7 @@ class TestTSO(TestCase):
>          cmd = "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=512 --txd=512 --
> burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --
> txwt=0 --txfreet=32 --txrst=32 " % (self.target, self.coreMask,
> self.dut.get_memory_channels(), self.blacklist, self.portMask)
>          self.dut.send_expect(cmd, "testpmd> ", 120)
>          self.dut.send_expect("set verbose 1", "testpmd> ", 120)
> +        self.dut.send_expect("port stop all", "testpmd> ", 120)
>          self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ",
> 120)
>          self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd>
> ", 120)
>          self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd>
> ", 120) @@ -176,6 +162,7 @@ class TestTSO(TestCase):
> 
>          self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ",
> 120)
>          self.dut.send_expect("set fwd csum", "testpmd> ", 120)
> +        self.dut.send_expect("port start all", "testpmd> ", 120)
>          self.dut.send_expect("start", "testpmd> ")
> 
>          self.tester.scapy_foreground()
> @@ -226,6 +213,7 @@ class TestTSO(TestCase):
>          cmd = "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=512 --txd=512 --
> burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --
> txwt=0 --txfreet=32 --txrst=32 " % (self.target, self.coreMask,
> self.dut.get_memory_channels(), self.blacklist, self.portMask)
>          self.dut.send_expect(cmd, "testpmd> ", 120)
>          self.dut.send_expect("set verbose 1", "testpmd> ", 120)
> +        self.dut.send_expect("port stop all", "testpmd> ", 120)
>          self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ",
> 120)
>          self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd>
> ", 120)
>          self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd>
> ", 120) @@ -242,6 +230,7 @@ class TestTSO(TestCase):
> 
>          self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ",
> 120)
>          self.dut.send_expect("set fwd csum", "testpmd> ", 120)
> +        self.dut.send_expect("port start all", "testpmd> ", 120)
>          self.dut.send_expect("start", "testpmd> ")
> 
>          self.tester.scapy_foreground()
> @@ -295,6 +284,7 @@ class TestTSO(TestCase):
>              self.rst_report(command_line + "\n\n", frame=True, annex=True)
> 
>              self.dut.send_expect(command_line, "testpmd> ", 120)
> +            self.dut.send_expect("port stop all", "testpmd> ", 120)
>              self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd>
> ", 120)
>              self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0],
> "testpmd> ", 120)
>              self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd>
> ", 120) @@ -309,6 +299,7 @@ class TestTSO(TestCase):
>              self.dut.send_expect("csum parse-tunnel on %d" % self.dut_ports[1],
> "testpmd> ", 120)
>              self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ",
> 120)
>              self.dut.send_expect("set fwd csum", "testpmd> ", 120)
> +            self.dut.send_expect("port start all", "testpmd> ", 120)
>              self.dut.send_expect("start", "testpmd> ")
>              for frame_size in self.frame_sizes:
>                  wirespeed = self.wirespeed(self.nic, frame_size, 2) @@ -350,3 +341,15
> @@ class TestTSO(TestCase):
>              self.result_table_add(table_row)
> 
>          self.result_table_print()
> +    def tear_down(self):
> +        """
> +        Run after each test case.
> +        """
> +        self.dut.kill_all()
> +        time.sleep(2)
> +
> +    def tear_down_all(self):
> +        """
> +        Run after each test suite.
> +        """
> +        pass
> --
> 2.17.2


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

* [dts] [PATCH V1] tests/tso: should stop ports before set csum
@ 2019-05-17  1:28 Wenjie Li
  2019-05-17  1:26 ` Li, WenjieX A
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wenjie Li @ 2019-05-17  1:28 UTC (permalink / raw)
  To: dts; +Cc: Wenjie Li

1. should stop ports before set csum and start ports after the settings
2. there is no clear indication of which network card is not supported,
will not check the nic type anymore
3. add tear_down and tear_down_all
4. delete unless comment/code

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
 tests/TestSuite_tso.py | 33 ++++++++++++++++++---------------
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py
index 6735169..5e0dbd5 100644
--- a/tests/TestSuite_tso.py
+++ b/tests/TestSuite_tso.py
@@ -51,13 +51,6 @@ class TestTSO(TestCase):
         """
         Run at the start of each test suite.
         """
-        # this feature support Fortville, Niantic
-        self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM",
-                                 "82540EM", "springfountain", "fortville_eagle",
-                                 "fortville_spirit", "fortville_spirit_single",
-                                 "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV","fortville_25g","hi1822", "cavium_a063"],
-                    "NIC Unsupported: " + str(self.nic))
-
         # Based on h/w type, choose how many ports to use
         self.dut_ports = self.dut.get_ports(self.nic)
 
@@ -72,12 +65,6 @@ class TestTSO(TestCase):
         self.frame_sizes = [128, 1458]
         self.rxfreet_values = [0, 8, 16, 32, 64, 128]
 
-        # self.test_cycles = [{'cores': '1S/1C/1T', 'Mpps': {}, 'pct': {}},
-        #                     {'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {}},
-        #                     {'cores': '1S/2C/1T', 'Mpps': {}, 'pct': {}},
-        #                     {'cores': '1S/2C/2T', 'Mpps': {}, 'pct': {}},
-        #                     {'cores': '1S/4C/2T', 'Mpps': {}, 'pct': {}}
-        #                     ]
         self.test_cycles = [{'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {}}]
 
         self.table_header = ['Frame Size']
@@ -87,8 +74,6 @@ class TestTSO(TestCase):
 
         self.blacklist = ""
 
-        # self.coreMask = utils.create_mask(cores)
-
         self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE[
             'ip'] + HEADER_SIZE['tcp']
 
@@ -160,6 +145,7 @@ class TestTSO(TestCase):
         cmd = "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=512 --txd=512 --burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32 " % (self.target, self.coreMask, self.dut.get_memory_channels(), self.blacklist, self.portMask)
         self.dut.send_expect(cmd, "testpmd> ", 120)
         self.dut.send_expect("set verbose 1", "testpmd> ", 120)
+        self.dut.send_expect("port stop all", "testpmd> ", 120)
         self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ", 120)
         self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd> ", 120)
         self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd> ", 120)
@@ -176,6 +162,7 @@ class TestTSO(TestCase):
 
         self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ", 120)
         self.dut.send_expect("set fwd csum", "testpmd> ", 120)
+        self.dut.send_expect("port start all", "testpmd> ", 120)
         self.dut.send_expect("start", "testpmd> ")
 
         self.tester.scapy_foreground()
@@ -226,6 +213,7 @@ class TestTSO(TestCase):
         cmd = "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=512 --txd=512 --burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32 " % (self.target, self.coreMask, self.dut.get_memory_channels(), self.blacklist, self.portMask)
         self.dut.send_expect(cmd, "testpmd> ", 120)
         self.dut.send_expect("set verbose 1", "testpmd> ", 120)
+        self.dut.send_expect("port stop all", "testpmd> ", 120)
         self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ", 120)
         self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd> ", 120)
         self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd> ", 120)
@@ -242,6 +230,7 @@ class TestTSO(TestCase):
 
         self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ", 120)
         self.dut.send_expect("set fwd csum", "testpmd> ", 120)
+        self.dut.send_expect("port start all", "testpmd> ", 120)
         self.dut.send_expect("start", "testpmd> ")
 
         self.tester.scapy_foreground()
@@ -295,6 +284,7 @@ class TestTSO(TestCase):
             self.rst_report(command_line + "\n\n", frame=True, annex=True)
 
             self.dut.send_expect(command_line, "testpmd> ", 120)
+            self.dut.send_expect("port stop all", "testpmd> ", 120)
             self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ", 120)
             self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd> ", 120)
             self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd> ", 120)
@@ -309,6 +299,7 @@ class TestTSO(TestCase):
             self.dut.send_expect("csum parse-tunnel on %d" % self.dut_ports[1], "testpmd> ", 120)
             self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ", 120)
             self.dut.send_expect("set fwd csum", "testpmd> ", 120)
+            self.dut.send_expect("port start all", "testpmd> ", 120)
             self.dut.send_expect("start", "testpmd> ")
             for frame_size in self.frame_sizes:
                 wirespeed = self.wirespeed(self.nic, frame_size, 2)
@@ -350,3 +341,15 @@ class TestTSO(TestCase):
             self.result_table_add(table_row)
 
         self.result_table_print()
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        self.dut.kill_all()
+        time.sleep(2)
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
2.17.2


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

* Re: [dts] [PATCH V1] tests/tso: should stop ports before set csum
  2019-05-17  1:28 [dts] [PATCH V1] tests/tso: should stop ports before set csum Wenjie Li
  2019-05-17  1:26 ` Li, WenjieX A
  2019-05-17  1:26 ` Li, WenjieX A
@ 2019-05-22  5:54 ` Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2019-05-22  5:54 UTC (permalink / raw)
  To: Li, WenjieX A, dts; +Cc: Li, WenjieX A

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
> Sent: Friday, May 17, 2019 9:29 AM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts] [PATCH V1] tests/tso: should stop ports before set csum
> 
> 1. should stop ports before set csum and start ports after the settings 2.
> there is no clear indication of which network card is not supported, will not
> check the nic type anymore 3. add tear_down and tear_down_all 4. delete
> unless comment/code
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
>  tests/TestSuite_tso.py | 33 ++++++++++++++++++---------------
>  1 file changed, 18 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py index
> 6735169..5e0dbd5 100644
> --- a/tests/TestSuite_tso.py
> +++ b/tests/TestSuite_tso.py
> @@ -51,13 +51,6 @@ class TestTSO(TestCase):
>          """
>          Run at the start of each test suite.
>          """
> -        # this feature support Fortville, Niantic
> -        self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM",
> -                                 "82540EM", "springfountain", "fortville_eagle",
> -                                 "fortville_spirit", "fortville_spirit_single",
> -                                 "redrockcanyou", "atwood", "boulderrapid",
> "fortpark_TLV","fortville_25g","hi1822", "cavium_a063"],
> -                    "NIC Unsupported: " + str(self.nic))
> -
>          # Based on h/w type, choose how many ports to use
>          self.dut_ports = self.dut.get_ports(self.nic)
> 
> @@ -72,12 +65,6 @@ class TestTSO(TestCase):
>          self.frame_sizes = [128, 1458]
>          self.rxfreet_values = [0, 8, 16, 32, 64, 128]
> 
> -        # self.test_cycles = [{'cores': '1S/1C/1T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/2C/1T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/2C/2T', 'Mpps': {}, 'pct': {}},
> -        #                     {'cores': '1S/4C/2T', 'Mpps': {}, 'pct': {}}
> -        #                     ]
>          self.test_cycles = [{'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {}}]
> 
>          self.table_header = ['Frame Size'] @@ -87,8 +74,6 @@ class
> TestTSO(TestCase):
> 
>          self.blacklist = ""
> 
> -        # self.coreMask = utils.create_mask(cores)
> -
>          self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE[
>              'ip'] + HEADER_SIZE['tcp']
> 
> @@ -160,6 +145,7 @@ class TestTSO(TestCase):
>          cmd = "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=512 --txd=512 --
> burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --
> txwt=0 --txfreet=32 --txrst=32 " % (self.target, self.coreMask,
> self.dut.get_memory_channels(), self.blacklist, self.portMask)
>          self.dut.send_expect(cmd, "testpmd> ", 120)
>          self.dut.send_expect("set verbose 1", "testpmd> ", 120)
> +        self.dut.send_expect("port stop all", "testpmd> ", 120)
>          self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd>
> ", 120)
>          self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0],
> "testpmd> ", 120)
>          self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0],
> "testpmd> ", 120) @@ -176,6 +162,7 @@ class TestTSO(TestCase):
> 
>          self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ",
> 120)
>          self.dut.send_expect("set fwd csum", "testpmd> ", 120)
> +        self.dut.send_expect("port start all", "testpmd> ", 120)
>          self.dut.send_expect("start", "testpmd> ")
> 
>          self.tester.scapy_foreground()
> @@ -226,6 +213,7 @@ class TestTSO(TestCase):
>          cmd = "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=512 --txd=512 --
> burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --
> txwt=0 --txfreet=32 --txrst=32 " % (self.target, self.coreMask,
> self.dut.get_memory_channels(), self.blacklist, self.portMask)
>          self.dut.send_expect(cmd, "testpmd> ", 120)
>          self.dut.send_expect("set verbose 1", "testpmd> ", 120)
> +        self.dut.send_expect("port stop all", "testpmd> ", 120)
>          self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd>
> ", 120)
>          self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0],
> "testpmd> ", 120)
>          self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0],
> "testpmd> ", 120) @@ -242,6 +230,7 @@ class TestTSO(TestCase):
> 
>          self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ",
> 120)
>          self.dut.send_expect("set fwd csum", "testpmd> ", 120)
> +        self.dut.send_expect("port start all", "testpmd> ", 120)
>          self.dut.send_expect("start", "testpmd> ")
> 
>          self.tester.scapy_foreground()
> @@ -295,6 +284,7 @@ class TestTSO(TestCase):
>              self.rst_report(command_line + "\n\n", frame=True, annex=True)
> 
>              self.dut.send_expect(command_line, "testpmd> ", 120)
> +            self.dut.send_expect("port stop all", "testpmd> ", 120)
>              self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0],
> "testpmd> ", 120)
>              self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0],
> "testpmd> ", 120)
>              self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0],
> "testpmd> ", 120) @@ -309,6 +299,7 @@ class TestTSO(TestCase):
>              self.dut.send_expect("csum parse-tunnel on %d" % self.dut_ports[1],
> "testpmd> ", 120)
>              self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd>
> ", 120)
>              self.dut.send_expect("set fwd csum", "testpmd> ", 120)
> +            self.dut.send_expect("port start all", "testpmd> ", 120)
>              self.dut.send_expect("start", "testpmd> ")
>              for frame_size in self.frame_sizes:
>                  wirespeed = self.wirespeed(self.nic, frame_size, 2) @@ -350,3
> +341,15 @@ class TestTSO(TestCase):
>              self.result_table_add(table_row)
> 
>          self.result_table_print()
> +    def tear_down(self):
> +        """
> +        Run after each test case.
> +        """
> +        self.dut.kill_all()
> +        time.sleep(2)
> +
> +    def tear_down_all(self):
> +        """
> +        Run after each test suite.
> +        """
> +        pass
> --
> 2.17.2


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

end of thread, other threads:[~2019-05-22  5:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17  1:28 [dts] [PATCH V1] tests/tso: should stop ports before set csum Wenjie Li
2019-05-17  1:26 ` Li, WenjieX A
2019-05-17  1:26 ` Li, WenjieX A
2019-05-22  5:54 ` 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).