test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1] test/smoke:remove specific parameters in common cases
@ 2021-12-01 14:12 Lewei Yang
  2021-12-16 10:49 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Lewei Yang @ 2021-12-01 14:12 UTC (permalink / raw)
  To: dts; +Cc: Lewei Yang

remove specific parameters in common cases.

Signed-off-by: Lewei Yang <leweix.yang@intel.com>
---
 test_plans/pf_smoke_test_plan.rst | 14 ++++++++------
 test_plans/vf_smoke_test_plan.rst | 13 +++++++------
 tests/TestSuite_pf_smoke.py       | 17 ++++++++++-------
 tests/TestSuite_vf_smoke.py       | 19 ++++++++++++-------
 4 files changed, 37 insertions(+), 26 deletions(-)

diff --git a/test_plans/pf_smoke_test_plan.rst b/test_plans/pf_smoke_test_plan.rst
index 2b6c6128..ffcd2105 100644
--- a/test_plans/pf_smoke_test_plan.rst
+++ b/test_plans/pf_smoke_test_plan.rst
@@ -71,7 +71,7 @@ Prerequisites
 
 8. Launch dpdk on PF::
 
-    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:86:00.0 --file-prefix=pf -- -i --max-pkt-len=9600 --tx-offloads=0x00008000 --rxq=4 --txq=4
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:86:00.0 --file-prefix=pf -- -i --rxq=4 --txq=4
     testpmd> set fwd mac
     testpmd> set verbose 3
     testpmd> start
@@ -79,13 +79,15 @@ Prerequisites
 
 Test Case 1: test enable and disable jumbo frame
 ====================================================
-1. set fwd mode is mac::
+1. when launch dpdk on PF, add  parameter '--max-pkt-len=9600 --tx-offloads=0x00008000'
+
+2. set fwd mode is mac::
 
     testpmd> set fwd mac
     testpmd> set verbose 3
     testpmd> start
 
-2. Send a packet with size 9601 bytes ::
+3. Send a packet with size 9601 bytes ::
 
     testpmd> show port stats 0
 
@@ -96,7 +98,7 @@ Test Case 1: test enable and disable jumbo frame
 
 Verify that TX-bytes on port 0 and RX-bytes on port 0 are 0.
 
-3. Send a packet with size 9600 bytes ::
+4. Send a packet with size 9600 bytes ::
 
     testpmd> show port stats 0
 
@@ -107,11 +109,11 @@ Verify that TX-bytes on port 0 and RX-bytes on port 0 are 0.
 
 Verify that TX-bytes on port 0 and RX-bytes on port 0 are 9600.
 
-4. Set mtu is 1500 ::
+5. Set mtu is 1500 ::
 
     testpmd> port config mtu 1500
 
-5. Send a packet with size 1518 bytes ::
+6. Send a packet with size 1518 bytes ::
 
     testpmd> show port stats 0
 
diff --git a/test_plans/vf_smoke_test_plan.rst b/test_plans/vf_smoke_test_plan.rst
index 650f759c..43330c10 100644
--- a/test_plans/vf_smoke_test_plan.rst
+++ b/test_plans/vf_smoke_test_plan.rst
@@ -82,7 +82,7 @@ Prerequisites
 
 8. Launch dpdk on VF::
 
-    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:86:01.0 --file-prefix=pf -- -i --max-pkt-len=9600 --tx-offloads=0x00008000 --rxq=4 --txq=4
+    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:86:01.0 --file-prefix=pf -- -i --rxq=4 --txq=4
     testpmd> set fwd mac
     testpmd> set verbose 3
     testpmd> start
@@ -91,14 +91,15 @@ Prerequisites
 
 Test Case 1: test enable and disable jumbo frame
 ====================================================
+1. when launch dpdk on VF, add  parameter '--max-pkt-len=9600 --tx-offloads=0x00008000'
 
-1. set fwd mode is mac::
+2. set fwd mode is mac::
 
     testpmd> set fwd mac
     testpmd> set verbose 3
     testpmd> start
 
-2. Send a packet with size 9601 bytes ::
+3. Send a packet with size 9601 bytes ::
 
     testpmd> show port stats 0
 
@@ -109,7 +110,7 @@ Test Case 1: test enable and disable jumbo frame
 
 Verify that TX-bytes on port 0 and RX-bytes on port 0 are 0.
 
-3. Send a packet with size 9600 bytes ::
+4. Send a packet with size 9600 bytes ::
 
     testpmd> show port stats 0
 
@@ -120,11 +121,11 @@ Verify that TX-bytes on port 0 and RX-bytes on port 0 are 0.
 
 Verify that TX-bytes on port 0 and RX-bytes on port 0 are 9600.
 
-4. Set mtu is 1500 ::
+5. Set mtu is 1500 ::
 
     testpmd> port config mtu 1500
 
-5. Send a packet with size 1518 bytes ::
+6. Send a packet with size 1518 bytes ::
 
     testpmd> show port stats 0
 
diff --git a/tests/TestSuite_pf_smoke.py b/tests/TestSuite_pf_smoke.py
index 7477f498..a8e4adde 100644
--- a/tests/TestSuite_pf_smoke.py
+++ b/tests/TestSuite_pf_smoke.py
@@ -72,9 +72,6 @@ class TestPfSmoke(TestCase):
         # set default app parameter
         self.pmd_out = PmdOutput(self.dut)
         self.ports = [self.dut.ports_info[self.smoke_dut_ports[0]]['pci']]
-        self.param = '--max-pkt-len={} --tx-offloads=0x8000 --rxq={} --txq={}'.format(JUMBO_FRAME_LENGTH,
-                                                                                      LAUNCH_QUEUE,
-                                                                                      LAUNCH_QUEUE)
         self.test_func = SmokeTest(self)
         self.check_session = self.dut.new_session(suite="pf_smoke_test")
 
@@ -82,15 +79,19 @@ class TestPfSmoke(TestCase):
         """
         Run before each test case.
         """
+        # set tester mtu and testpmd parameter
+        if self._suite_result.test_case == "test_pf_jumbo_frames":
+            self.tester.send_expect("ifconfig {} mtu {}".format(self.smoke_tester_nic, JUMBO_FRAME_MTU), '# ')
+            self.param = '--max-pkt-len={} --tx-offloads=0x8000 --rxq={} --txq={}'.format(JUMBO_FRAME_LENGTH,
+                                                                                          LAUNCH_QUEUE,
+                                                                                          LAUNCH_QUEUE)
+        else:
+            self.param = '--rxq={} --txq={}'.format(LAUNCH_QUEUE, LAUNCH_QUEUE)
         # verify app launch state.
         out = self.check_session.send_expect("ls -l /var/run/dpdk |awk '/^d/ {print $NF}'", '# ', 1)
         if out == '' or 'No such file or directory' in out:
             self.pf_launch_dpdk_app()
 
-        # set tester mtu
-        if self._suite_result.test_case == "test_pf_jumbo_frames":
-            self.tester.send_expect("ifconfig {} mtu {}".format(self.smoke_tester_nic, JUMBO_FRAME_MTU), '# ')
-
     def pf_launch_dpdk_app(self):
         self.pmd_out.start_testpmd(cores=self.cores, ports=self.ports, param=self.param)
 
@@ -146,6 +147,8 @@ class TestPfSmoke(TestCase):
             self.dut.send_expect("port config all rxq {}".format(LAUNCH_QUEUE), "testpmd> ")
             self.dut.send_expect("port config all txq {}".format(LAUNCH_QUEUE), "testpmd> ")
             self.dut.send_expect("port start all", "testpmd> ")
+        self.dut.send_expect("quit", "# ")
+        self.dut.kill_all()
 
     def tear_down_all(self):
         if self.check_session:
diff --git a/tests/TestSuite_vf_smoke.py b/tests/TestSuite_vf_smoke.py
index ab939acc..d63db2be 100644
--- a/tests/TestSuite_vf_smoke.py
+++ b/tests/TestSuite_vf_smoke.py
@@ -92,9 +92,6 @@ class TestVfSmoke(TestCase):
             self.ports = [self.vf0_prop['opt_host']]
 
         self.pmd_out = PmdOutput(self.dut)
-        self.param = '--max-pkt-len={} --tx-offloads=0x8000 --rxq={} --txq={}'.format(JUMBO_FRAME_LENGTH,
-                                                                                      LAUNCH_QUEUE,
-                                                                                      LAUNCH_QUEUE)
         self.test_func = SmokeTest(self)
         self.check_session = self.dut.new_session(suite="vf_smoke_test")
 
@@ -102,14 +99,20 @@ class TestVfSmoke(TestCase):
         """
         Run before each test case.
         """
+        # set tester mtu and testpmd parameter
+        if self._suite_result.test_case == "test_vf_jumbo_frames":
+            self.tester.send_expect("ifconfig {} mtu {}".format(self.smoke_tester_nic, JUMBO_FRAME_MTU), '# ')
+            self.param = '--max-pkt-len={} --tx-offloads=0x8000 --rxq={} --txq={}'.format(JUMBO_FRAME_LENGTH,
+                                                                                          LAUNCH_QUEUE,
+                                                                                          LAUNCH_QUEUE)
+        else:
+            self.param = '--rxq={} --txq={}'.format(LAUNCH_QUEUE, LAUNCH_QUEUE)
+
         # verify app launch state.
         out = self.check_session.send_expect("ls -l /var/run/dpdk |awk '/^d/ {print $NF}'", '# ', 1)
         if out == '' or 'No such file or directory' in out:
             self.vf_launch_dpdk_app()
 
-        if self._suite_result.test_case == "test_vf_jumbo_frames":
-            self.tester.send_expect("ifconfig {} mtu {}".format(self.smoke_tester_nic, JUMBO_FRAME_MTU), '# ')
-
     def vf_launch_dpdk_app(self):
         self.pmd_out.start_testpmd(cores=self.cores, ports=self.ports, param=self.param)
 
@@ -155,7 +158,7 @@ class TestVfSmoke(TestCase):
         # set tester mtu to default value
         self.pmd_out.execute_cmd("stop")
         if self._suite_result.test_case == "test_vf_jumbo_frames":
-            self.tester.send_expect("ifconfig {} mtu {}".format(self.smoke_tester_nic, DEFAULT_PKG_LEN), '# ')
+            self.tester.send_expect("ifconfig {} mtu {}".format(self.smoke_tester_nic, DEFAULT_MTU_VALUE), '# ')
 
         # set dpdk queues to launch value
         if self._suite_result.test_case == "test_vf_tx_rx_queue":
@@ -163,6 +166,8 @@ class TestVfSmoke(TestCase):
             self.dut.send_expect("port config all rxq {}".format(LAUNCH_QUEUE), "testpmd> ")
             self.dut.send_expect("port config all txq {}".format(LAUNCH_QUEUE), "testpmd> ")
             self.dut.send_expect("port start all", "testpmd> ")
+        self.dut.send_expect("quit", "# ")
+        self.dut.kill_all()
 
     def tear_down_all(self):
         if self.check_session:
-- 
2.33.1


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

* RE: [dts][PATCH V1] test/smoke:remove specific parameters in common cases
  2021-12-01 14:12 [dts][PATCH V1] test/smoke:remove specific parameters in common cases Lewei Yang
@ 2021-12-16 10:49 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2021-12-16 10:49 UTC (permalink / raw)
  To: Yang, LeweiX, dts; +Cc: Yang, LeweiX

> -----Original Message-----
> From: Lewei Yang <leweix.yang@intel.com>
> Sent: 2021年12月1日 22:13
> To: dts@dpdk.org
> Cc: Yang, LeweiX <leweix.yang@intel.com>
> Subject: [dts][PATCH V1] test/smoke:remove specific parameters in common
> cases
> 
> remove specific parameters in common cases.
> 
> Signed-off-by: Lewei Yang <leweix.yang@intel.com>

Applied, thanks

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

end of thread, other threads:[~2021-12-16 10:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 14:12 [dts][PATCH V1] test/smoke:remove specific parameters in common cases Lewei Yang
2021-12-16 10:49 ` 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).