test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V2] tests/short_live: display time in posix format and synchronize the core
@ 2022-05-30  1:56 Jiale Song
  2022-05-30  1:56 ` [dts] [PATCH V2] tests/userspace_ethtool: add method wait port link up and add checklist Jiale Song
  2022-06-15  8:39 ` [dts] [PATCH V2] tests/short_live: display time in posix format and synchronize the core lijuan.tu
  0 siblings, 2 replies; 3+ messages in thread
From: Jiale Song @ 2022-05-30  1:56 UTC (permalink / raw)
  To: dts; +Cc: Jiale Song

fix 2 issue:
  1.make the core in the eal parameter consistent with the core configured by 
the config parameter.
  2.the output format of '/usr/bin/time' of FreeBSD is different from that of 
conventional Linux. add the '-p' parameter to make it output in posix format.

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 tests/TestSuite_short_live.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_short_live.py b/tests/TestSuite_short_live.py
index a3a17edc..518d168c 100644
--- a/tests/TestSuite_short_live.py
+++ b/tests/TestSuite_short_live.py
@@ -39,6 +39,7 @@ class TestShortLiveApp(TestCase):
         self.app_l2fwd_path = self.dut.apps_name["l2fwd"]
         self.app_l3fwd_path = self.dut.apps_name["l3fwd"]
         self.app_testpmd = self.dut.apps_name["test-pmd"]
+        self.core_config = "1S/2C/1T"
         self.eal_para = self.dut.create_eal_parameters
 
     def set_up(self):
@@ -158,10 +159,12 @@ class TestShortLiveApp(TestCase):
         Using linux time to get start up time
         """
         time = []
-        regex = re.compile(".* (\d+:\d{2}\.\d{2}).*")
+        regex = re.compile(".*real (\d+\.\d{2}).*")
         eal_para = self.dut.create_eal_parameters(no_pci=True)
         out = self.dut.send_expect(
-            "echo quit | time ./%s %s -- -i" % (self.app_testpmd, eal_para), "# ", 120
+            "echo quit | time -p ./%s %s -- -i" % (self.app_testpmd, eal_para),
+            "# ",
+            120,
         )
         time = regex.findall(out)
 
@@ -221,12 +224,15 @@ class TestShortLiveApp(TestCase):
     def test_clean_up_with_signal_l3fwd(self):
         repeat_time = 5
         self.compile_examples("l3fwd")
+        core_list = self.dut.get_core_list(self.core_config)
+        eal_parmas = self.eal_para(cores=core_list)
+
         for i in range(repeat_time):
             # dpdk start
             print("clean_up_with_signal_l3fwd round %d" % (i + 1))
             self.dut.send_expect(
-                "%s %s -- -p 0x3 --config='(0,0,1),(1,0,2)' &"
-                % (self.app_l3fwd_path, self.eal_para()),
+                "%s %s -- -p 0x3 --config='(0,0,%s),(1,0,%s)' &"
+                % (self.app_l3fwd_path, eal_parmas, core_list[0], core_list[1]),
                 "L3FWD: entering main loop",
                 120,
             )
-- 
2.17.1


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

* [dts] [PATCH V2] tests/userspace_ethtool: add method wait port link up and add checklist
  2022-05-30  1:56 [dts] [PATCH V2] tests/short_live: display time in posix format and synchronize the core Jiale Song
@ 2022-05-30  1:56 ` Jiale Song
  2022-06-15  8:39 ` [dts] [PATCH V2] tests/short_live: display time in posix format and synchronize the core lijuan.tu
  1 sibling, 0 replies; 3+ messages in thread
From: Jiale Song @ 2022-05-30  1:56 UTC (permalink / raw)
  To: dts; +Cc: Jiale Song

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 6127 bytes --]

fix 4 issue:
  1.check and wait for the port status of the tester and dut to be up and delete some unnecessary delays.
  2.700 Series not support port disconnect by tools of linux, add 'I40E_10G-10G_BASE_T_X722'
and 'I40E_10G-10G_BASE_T_BC'.
  3.ensure that the dpdk app has exited and rebind the driver.
  4.the driver of 'IGC-I225_LM' is i40e, not support the case, add to checklist.

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 conf/test_case_checklist.json        |  3 ++-
 tests/TestSuite_userspace_ethtool.py | 34 ++++++++++++++++++----------
 2 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/conf/test_case_checklist.json b/conf/test_case_checklist.json
index 053841ce..0347bc54 100644
--- a/conf/test_case_checklist.json
+++ b/conf/test_case_checklist.json
@@ -2131,7 +2131,8 @@
                 "I40E_10G-SFP_X722",
                 "I40E_10G-10G_BASE_T_X722",
                 "IAVF_10G-X722_VF",
-                "I40E_10G-10G_BASE_T_BC"
+                "I40E_10G-10G_BASE_T_BC",
+                "IGC-I225_LM"
             ],
             "Target": [
                 "ALL"
diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index adbba999..9f0bd8a8 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -28,7 +28,7 @@ class TestUserspaceEthtool(TestCase):
         """
         self.ports = self.dut.get_ports()
         self.verify(len(self.ports) >= 2, "No ports found for " + self.nic)
-
+        self.other_700_nic = ["I40E_10G-10G_BASE_T_X722", "I40E_10G-10G_BASE_T_BC"]
         # build sample app
         out = self.dut.build_dpdk_apps("examples/ethtool")
         self.verify("Error" not in out, "compilation error 1")
@@ -263,18 +263,25 @@ class TestUserspaceEthtool(TestCase):
             portinfo["net_dev"].bind_driver(portinfo["ori_driver"])
 
         self.dut.send_expect(self.cmd, "EthApp>", 60)
+        for port in self.ports:
+            tester_port = self.tester.get_local_port(port)
+            intf = self.tester.get_interface(tester_port)
+            self.tester.is_interface_up(intf)
         # ethtool doesn't support port disconnect by tools of linux
         # only detect physical link disconnect status
         verify_pass = True
         verify_msg = ""
-        if not (self.is_eth_series_nic(700) or self.is_eth_series_nic(800)):
+        if not (
+            self.is_eth_series_nic(700)
+            or self.other_700_nic
+            or self.is_eth_series_nic(800)
+        ):
             # check link status dump function
             for port in self.ports:
                 tester_port = self.tester.get_local_port(port)
                 intf = self.tester.get_interface(tester_port)
                 self.tester.send_expect("ip link set dev %s down" % intf, "# ")
-            # wait for link stable
-            time.sleep(5)
+                self.tester.is_interface_down(intf)
 
             out = self.dut.send_expect("link", "EthApp>", 60)
             link_pattern = r"Port (\d+): (.*)"
@@ -299,8 +306,7 @@ class TestUserspaceEthtool(TestCase):
                 tester_port = self.tester.get_local_port(port)
                 intf = self.tester.get_interface(tester_port)
                 self.tester.send_expect("ip link set dev %s up" % intf, "# ")
-            # wait for link stable
-            time.sleep(5)
+                self.tester.is_interface_up(intf)
 
         # check port stats function
         pkt = Packet(pkt_type="UDP")
@@ -447,12 +453,13 @@ class TestUserspaceEthtool(TestCase):
             )
             pkt = Packet(pkt_type="UDP")
             tester_port = self.tester.get_local_port(port)
+            intf = self.tester.get_interface(tester_port)
+            self.tester.is_interface_up(intf)
             self.verify(
                 self.ethapp_check_link_status(index, "Up") == True,
                 "Fail to Open port{}".format(index),
             )
-
-            intf = self.tester.get_interface(tester_port)
+            time.sleep(1)
             pkt.send_pkt(self.tester, tx_port=intf, count=4)
             rx_pkts, tx_pkts = self.strip_portstats(index)
             self.verify(
@@ -532,6 +539,7 @@ class TestUserspaceEthtool(TestCase):
             pkt = Packet(pkt_type="UDP")
             tester_port = self.tester.get_local_port(port)
             intf = self.tester.get_interface(tester_port)
+            self.tester.is_interface_up(intf)
             pkt.send_pkt(self.tester, tx_port=intf, count=4)
             rx_pkts, tx_pkts = self.strip_portstats(index)
             self.verify(rx_pkts == ori_rx_pkts, "Failed to stop port")
@@ -575,7 +583,6 @@ class TestUserspaceEthtool(TestCase):
                 # Intel® Ethernet 800 Series should stop port before set mtu
                 if self.nic in ["ICE_25G-E810C_SFP", "ICE_100G-E810C_QSFP"]:
                     self.dut.send_expect("stop %s" % index, "EthApp>")
-
                 # The mtu threshold is 2022,When it is greater than 2022, the open/stop port is required.
                 if mtu > mtu_threshold:
                     if self.nic in [
@@ -592,7 +599,11 @@ class TestUserspaceEthtool(TestCase):
                 if self.nic in ["ICE_25G-E810C_SFP", "ICE_100G-E810C_QSFP"]:
                     self.dut.send_expect("open %s" % index, "EthApp>")
 
-                time.sleep(5)
+                self.tester.is_interface_up(intf)
+                self.verify(
+                    self.ethapp_check_link_status(index, "Up") == True,
+                    "Fail to Open port{}".format(index),
+                )
                 ori_rx_pkts, _ = self.strip_portstats(index)
                 pkt_size = mtu + HEADER_SIZE["eth"] + offset
                 pkt = Packet(pkt_type="UDP", pkt_len=pkt_size)
@@ -677,9 +688,8 @@ class TestUserspaceEthtool(TestCase):
         """
         Run after each test case.
         """
-        self.dut.bind_interfaces_linux(self.drivername)
         self.dut.kill_all()
-        pass
+        self.dut.bind_interfaces_linux(self.drivername)
 
     def tear_down_all(self):
         """
-- 
2.17.1


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

* [dts] [PATCH V2] tests/short_live: display time in posix format and synchronize the core
  2022-05-30  1:56 [dts] [PATCH V2] tests/short_live: display time in posix format and synchronize the core Jiale Song
  2022-05-30  1:56 ` [dts] [PATCH V2] tests/userspace_ethtool: add method wait port link up and add checklist Jiale Song
@ 2022-06-15  8:39 ` lijuan.tu
  1 sibling, 0 replies; 3+ messages in thread
From: lijuan.tu @ 2022-06-15  8:39 UTC (permalink / raw)
  To: dts, Jiale Song; +Cc: Jiale Song

On Mon, 30 May 2022 09:56:46 +0800, Jiale Song <songx.jiale@intel.com> wrote:
> fix 2 issue:
>   1.make the core in the eal parameter consistent with the core configured by 
> the config parameter.
>   2.the output format of '/usr/bin/time' of FreeBSD is different from that of 
> conventional Linux. add the '-p' parameter to make it output in posix format.
> 
> Signed-off-by: Jiale Song <songx.jiale@intel.com>


Applied, thanks

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

end of thread, other threads:[~2022-06-15  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30  1:56 [dts] [PATCH V2] tests/short_live: display time in posix format and synchronize the core Jiale Song
2022-05-30  1:56 ` [dts] [PATCH V2] tests/userspace_ethtool: add method wait port link up and add checklist Jiale Song
2022-06-15  8:39 ` [dts] [PATCH V2] tests/short_live: display time in posix format and synchronize the core lijuan.tu

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